1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

tools: fix v symlink, uname -o doesn't exist on macOS (#10303)

This commit is contained in:
pancake 2021-06-03 00:22:14 +02:00 committed by GitHub
parent b0bafa6376
commit 89d2f508cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ fn cleanup_vtmp_folder() {
fn setup_symlink_unix(vexe string) {
mut link_path := '/data/data/com.termux/files/usr/bin/v'
if os.system("uname -o | grep -q '[A/a]ndroid'") == 1 {
if !os.is_dir('/data/data/com.termux/files') {
link_dir := '/usr/local/bin'
if !os.exists(link_dir) {
os.mkdir_all(link_dir) or { panic(err) }