We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 877896c commit 52d788aCopy full SHA for 52d788a
lib/commands/server.js
@@ -40,8 +40,13 @@ exports.run = function (options) {
40
41
var isGoingToStartServer = true;
42
43
- // 检测预装插件
+ // 检测前置条件
44
if (proxy) {
45
+ if (!(process.getuid && process.getuid() === 0)) {
46
+ warn('权限不足, 请使用sudo执行');
47
+ process.exit(1);
48
+ }
49
+
50
try {
51
require.resolve("@qnpm/jerryproxy-ykit");
52
} catch (e) {
src/commands/server.js
@@ -40,8 +40,13 @@ exports.run = (options) => {
let isGoingToStartServer = true
if(proxy){
+ if(!(process.getuid && process.getuid() === 0)){
+ warn('权限不足, 请使用sudo执行')
+ process.exit(1)
require.resolve("@qnpm/jerryproxy-ykit")
} catch(e) {
0 commit comments