mirror of
https://github.com/whyour/qinglong.git
synced 2026-12-01 09:45:36 +08:00
增加 sudo 命令判断
This commit is contained in:
1 parent
7d8feadc78
commit
96b4c90398
10 files changed
+62
-24
No files matched your search
@@ -0,0 +1,7 @@
|
||||
export function isInContainer(): boolean {
|
||||
return process.env.QL_CONTAINER === 'true';
|
||||
}
|
||||
|
||||
export function maybeSudo(cmd: string): string {
|
||||
return isInContainer() ? `sudo ${cmd}` : cmd;
|
||||
}
|
||||
Reference in new issue
Block a user