From 8e32ef382a9e270c8a2cd35708280cffc4373880 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Wed, 20 Nov 2019 18:27:22 +0300 Subject: [PATCH] fix `v symlink` --- .github/workflows/ci.yml | 2 ++ vlib/compiler/main.v | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47069c010f..d6959192a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,8 @@ jobs: run: ./v test v # - name: Test v->js # run: ./v -o hi.js examples/hello_v_js.v && node hi.js + - name: Test symlink + run: ./v symlink && v -o v2 v.v - name: Test vid run: | git clone --depth 1 https://github.com/vlang/vid.git diff --git a/vlib/compiler/main.v b/vlib/compiler/main.v index ecf64e48f9..0498256016 100644 --- a/vlib/compiler/main.v +++ b/vlib/compiler/main.v @@ -1035,7 +1035,8 @@ pub fn vfmt(args[]string) { } pub fn create_symlink() { - vexe := vexe_path() + $if windows { return } + vexe := os.executable() link_path := '/usr/local/bin/v' ret := os.system('ln -sf $vexe $link_path') if ret == 0 {