Skip to content

Commit

Permalink
Sync assemble of 20 with 20-minimal
Browse files Browse the repository at this point in the history
This makes the cache clearning working, otherwise the
 command creates some debug log inside of
after the  is cleared. That makes the test test_npm_cache_cleared
to fail.
  • Loading branch information
hhorak committed Aug 30, 2023
1 parent 34919ee commit 1f48765
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions 20-minimal/s2i/bin/assemble
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ else
echo "---> Pruning the development dependencies"
npm prune

NPM_TMP=$(npm config get tmp)
if ! mountpoint $NPM_TMP; then
echo "---> Cleaning the $NPM_TMP/npm-*"
rm -rf $NPM_TMP/npm-*
fi

# Clear the npm's cache and tmp directories only if they are not a docker volumes
NPM_CACHE=$(npm config get cache)
if ! mountpoint $NPM_CACHE; then
Expand All @@ -104,12 +110,6 @@ else
# We do not want to delete .npmrc file.
rm -rf "${NPM_CACHE:?}/"
fi
NPM_TMP=$(npm config get tmp)
if ! mountpoint $NPM_TMP; then
echo "---> Cleaning the $NPM_TMP/npm-*"
rm -rf $NPM_TMP/npm-*
fi

fi

# Fix source directory permissions
Expand Down

0 comments on commit 1f48765

Please sign in to comment.