Skip to content

Commit

Permalink
psh
Browse files Browse the repository at this point in the history
  • Loading branch information
Unitech committed Nov 13, 2024
1 parent 509e548 commit 7add6a5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
16 changes: 6 additions & 10 deletions bin/pm2
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
#!/usr/bin/env bash
#!/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');
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@
],
"bin": {
"pm2": "bin/pm2",
"pm2.cmd": "bin/pm2.cmd",
"pm2-dev": "bin/pm2-dev",
"pm2-docker": "bin/pm2-docker",
"pm2-runtime": "bin/pm2-runtime"
Expand Down

0 comments on commit 7add6a5

Please sign in to comment.