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 9c49e17 commit 509e548
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions bin/pm2
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#!/bin/sh -
':' /*-
bun=$(bun --version 2>&1) && exec bun "$0" "$@"
node=$(node --version 2>&1) && exec node "$0" "$@"
*/
#!/usr/bin/env bash

require('../lib/binaries/CLI.js');
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

0 comments on commit 509e548

Please sign in to comment.