Skip to content

Commit abfdb3a

Browse files
authored
Merge pull request #2173 from Automattic/dev-env-disallow-root
fix(dev-env): disallow running dev-env as `root`
2 parents 7ac7b15 + 587778e commit abfdb3a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/bin/vip-dev-env.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
import command from '../lib/cli/command';
44

5+
if ( process.getuid?.() === 0 ) {
6+
console.error( 'This script should not be run as root. Exiting.' );
7+
process.exit( 1 );
8+
}
9+
510
command( {
611
requiredArgs: 0,
712
} )

0 commit comments

Comments
 (0)