Skip to content

Commit

Permalink
Merge pull request #1106 from LukasGentele/npm-installer
Browse files Browse the repository at this point in the history
installer: npx compatibility
  • Loading branch information
Lukas Gentele committed May 15, 2020
2 parents f4be320 + 10c9ae8 commit 85e15ea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dist/npm/bin/devspace
@@ -1,8 +1,9 @@
#!/usr/bin/env sh

BINARY=$(command -v devspace)
STAT=$(stat --printf="%s" "$BINARY" 2>/dev/null)

if [ -f "$BINARY" ] || [ $(stat --printf="%s" "$BINARY") -lt 10000 ]; then
if [ ! -f "$BINARY" ] || [ "$STAT" -lt 10000 ]; then
echo "Finishing installation of DevSpace CLI"

BINDIR="$(dirname $0)"
Expand Down Expand Up @@ -31,7 +32,7 @@ if [ -f "$BINARY" ] || [ $(stat --printf="%s" "$BINARY") -lt 10000 ]; then
echo "Running: node $BASEDIR/$INDEX_FILE finish-install $BINDIR"
/usr/bin/env node "$BASEDIR/$INDEX_FILE" finish-install $BINDIR;

devspace "$@" 2>/dev/null || devspace.exe "$@";
$BINDIR/devspace "$@" 2>/dev/null || $BINDIR/devspace.exe "$@" || devspace "$@" 2>/dev/null || devspace.exe "$@";
exit $?;
fi

Expand Down

0 comments on commit 85e15ea

Please sign in to comment.