From f461a21a5030f7372637859f92d945791826cc27 Mon Sep 17 00:00:00 2001 From: Toby Webb Date: Sat, 12 Oct 2019 02:03:37 +0200 Subject: [PATCH] compiler: fix v command to accept '.v' as valid file --- compiler/main.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/main.v b/compiler/main.v index fd6e9bae07..c339426510 100644 --- a/compiler/main.v +++ b/compiler/main.v @@ -899,7 +899,7 @@ fn new_v(args[]string) &V { exit(1) } // No -o provided? foo.v => foo - if out_name == 'a.out' && dir.ends_with('.v') { + if out_name == 'a.out' && dir.ends_with('.v') && dir != '.v' { out_name = dir.left(dir.len - 2) } // if we are in `/foo` and run `v .`, the executable should be `foo`