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

pull/10336/head
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
1 changed files with 1 additions and 1 deletions

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) }