We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c61128b commit 8efe8ceCopy full SHA for 8efe8ce
netepscript.sh
@@ -7,13 +7,7 @@ RED='\033[0;31m'
7
BOLD='\033[1m'
8
NC='\033[0m'
9
10
-SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
11
-PACKAGE_JSON="$SCRIPT_DIR/package.json"
12
-if [ ! -f "$PACKAGE_JSON" ]; then
13
- echo -e "${RED}Error: package.json not found in $PACKAGE_JSON${NC}"
14
- exit 1
15
-fi
16
-VERSION=$(jq -r .version "$PACKAGE_JSON")
+VERSION=$(npm list netepscript -g --depth=0 2>/dev/null | grep netepscript | cut -d@ -f2)
17
18
echo -e "${GREEN}=========================================================${NC}"
19
echo -e "${BLUE} ${BOLD}netepScript v${VERSION}${NC}"
0 commit comments