Skip to content

Commit

Permalink
exec win
Browse files Browse the repository at this point in the history
  • Loading branch information
Unitech committed Nov 13, 2024
1 parent 2b154e3 commit 8dde327
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 39 deletions.
16 changes: 6 additions & 10 deletions bin/pm2
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
#!/bin/sh
#!/bin/sh -
':' /*-
bun=$(bun --version 2>&1) && exec bun "$0" "$@"
node=$(node --version 2>&1) && exec node "$0" "$@"
*/

SCRIPT_PATH="$(dirname "$0")/../lib/binaries/CLI.js"

# Check if 'bun' is available, otherwise use 'node'
if command -v bun >/dev/null 2>&1
then
bun "$SCRIPT_PATH" "$@"
else
node "$SCRIPT_PATH" "$@"
fi
require('../lib/binaries/CLI.js');
11 changes: 11 additions & 0 deletions bin/pm2-lg
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

SCRIPT_PATH="$(dirname "$0")/../lib/binaries/CLI.js"

# Check if 'bun' is available, otherwise use 'node'
if command -v bun >/dev/null 2>&1
then
bun "$SCRIPT_PATH" "$@"
else
node "$SCRIPT_PATH" "$@"
fi
3 changes: 0 additions & 3 deletions bin/pm2-windows

This file was deleted.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@
"scripts": {
"test:unit": "bash test/unit.sh",
"test:e2e": "bash test/e2e.sh",
"test": "bash test/unit.sh && bash test/e2e.sh",
"preinstall": "node ./preinstall.js"
"test": "bash test/unit.sh && bash test/e2e.sh"
},
"keywords": [
"cli",
Expand Down
24 changes: 0 additions & 24 deletions preinstall.js

This file was deleted.

0 comments on commit 8dde327

Please sign in to comment.