-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'g update'自我更新 #19
Comments
filepath.Abs(os.Args[0]) |
这个函数是不能满足需求的哦。可以具体看下函数的实现:如果入参不是绝对路径(如 |
试试这个包? |
|
voidint
added a commit
that referenced
this issue
Apr 2, 2022
voidint
added a commit
that referenced
this issue
Apr 3, 2022
1.3.0 版本已支持 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
如何获取当前可执行程序的绝对路径?
os.Readlink("/proc/self/exe")
exec.LookPath("g")
方式可能并不准确,因为依赖于PATH
环境变量。The text was updated successfully, but these errors were encountered: