mirror of
https://github.com/danog/code-server.git
synced 2024-11-26 20:34:56 +01:00
fix: fix can't run it as expected in freebsd (#5595)
In freebsd, su -c expects a login class argument instead of a command, if -c is preceded by a username, then -c and the arguments that follow will be passed as shell arguments
This commit is contained in:
parent
acdbefb986
commit
b6aeb4bfab
@ -556,7 +556,7 @@ sudo_sh_c() {
|
||||
elif command_exists sudo; then
|
||||
sh_c "sudo $*"
|
||||
elif command_exists su; then
|
||||
sh_c "su - -c '$*'"
|
||||
sh_c "su root -c '$*'"
|
||||
else
|
||||
echoh
|
||||
echoerr "This script needs to run the following command as root."
|
||||
|
Loading…
Reference in New Issue
Block a user