-
Notifications
You must be signed in to change notification settings - Fork 520
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: npm_package.pack should work in windows os
- Loading branch information
1 parent
c89ff38
commit 503d6fb
Showing
7 changed files
with
108 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
archived=$1 | ||
if [ -f "$archived" ]; then | ||
echo "RUNFILES are supported in this OS" | ||
# run files are supported (not windows os), we can read the | ||
# input from arguments directly | ||
rm -rf ./pack && mkdir ./pack | ||
tar -xvzf $1 -C ./pack | ||
diff -r ./pack/package $2 | ||
if [ $? -ne 0 ]; then | ||
echo "The directory was modified"; | ||
exit 1 | ||
fi | ||
else | ||
# runfiles are not supported in Windows, | ||
# hard coding the test input for now | ||
rm -rf ./pack && mkdir ./pack | ||
tar -xvzf ../../test-pkg.tgz -C ./pack | ||
diff ./pack/package ../../test_pkg | ||
if [ $? -ne 0 ]; then | ||
echo "The directory was modified"; | ||
exit 1 | ||
fi | ||
fi | ||
|
||
exit 0 |