Skip to content

Commit

Permalink
fix(dev-env): disallow running dev-env as root
Browse files Browse the repository at this point in the history
  • Loading branch information
sjinks committed Dec 25, 2024
1 parent 29a47ce commit ee7a201
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/bin/vip-dev-env.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

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

if ( process.getuid?.() === 0 ) {
console.error( 'This script should not be run as root. Exiting.' );
process.exit( 1 );
}

command( {
requiredArgs: 0,
} )
Expand Down

0 comments on commit ee7a201

Please sign in to comment.