diff --git a/compiler/main.v b/compiler/main.v index 02a70b8877..4d00651032 100644 --- a/compiler/main.v +++ b/compiler/main.v @@ -757,6 +757,9 @@ mut args := '' // Output executable name // else { a << '-o $v.out_name' + if os.dir_exists(v.out_name) { + panic('\'$v.out_name\' is a directory') + } // The C file we are compiling //a << '"$TmpPath/$v.out_name_c"' a << '".$v.out_name_c"'