Skip to content

Commit 7fc9df1

Browse files
author
Unitech
committed
more checkups
1 parent e4d264c commit 7fc9df1

File tree

4 files changed

+40
-8
lines changed

4 files changed

+40
-8
lines changed

bin/pm2

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1-
#!/usr/bin/env node
1+
#!/bin/bash
22

3-
require('../lib/binaries/CLI.js');
3+
SCRIPT_PATH="$(dirname "$0")/../lib/binaries/CLI.js"
4+
5+
# Check if 'bun' is available, otherwise use 'node'
6+
if command -v bun &> /dev/null
7+
then
8+
bun "$SCRIPT_PATH" "$@"
9+
else
10+
node "$SCRIPT_PATH" "$@"
11+
fi

bin/pm2-dev

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1-
#!/usr/bin/env node
1+
#!/bin/bash
22

3-
require('../lib/binaries/DevCLI.js');
3+
SCRIPT_PATH="$(dirname "$0")/../lib/binaries/DevCLI.js"
4+
5+
# Check if 'bun' is available, otherwise use 'node'
6+
if command -v bun &> /dev/null
7+
then
8+
bun "$SCRIPT_PATH" "$@"
9+
else
10+
node "$SCRIPT_PATH" "$@"
11+
fi

bin/pm2-docker

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1-
#!/usr/bin/env node
1+
#!/bin/bash
22

3-
require('../lib/binaries/Runtime4Docker.js');
3+
SCRIPT_PATH="$(dirname "$0")/../lib/binaries/Runtime4Docker.js"
4+
5+
# Check if 'bun' is available, otherwise use 'node'
6+
if command -v bun &> /dev/null
7+
then
8+
bun "$SCRIPT_PATH" "$@"
9+
else
10+
node "$SCRIPT_PATH" "$@"
11+
fi

bin/pm2-runtime

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1-
#!/usr/bin/env node
1+
#!/bin/bash
22

3-
require('../lib/binaries/Runtime4Docker.js');
3+
SCRIPT_PATH="$(dirname "$0")/../lib/binaries/Runtime4Docker.js"
4+
5+
# Check if 'bun' is available, otherwise use 'node'
6+
if command -v bun &> /dev/null
7+
then
8+
bun "$SCRIPT_PATH" "$@"
9+
else
10+
node "$SCRIPT_PATH" "$@"
11+
fi

0 commit comments

Comments
 (0)