Skip to content

Commit 9ab929f

Browse files
Merge pull request #29 from Harsh-Microsoft/grp-depbot-security-pr
refactor: Use absolute path for dependency installation files in Depe…
2 parents cc095fe + b21de35 commit 9ab929f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/group-dependabot-security-updates.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,13 @@ jobs:
216216
if [ -s deps_to_install.txt ]; then
217217
if [ -f "$project_dir/yarn.lock" ]; then
218218
echo "Using yarn to add/update dependencies in $project_dir..."
219-
# By running `yarn add` for each package, we let yarn handle adding or updating the dependency.
220-
(cd "$project_dir" && xargs -n 1 yarn add < ../deps_to_install.txt)
219+
# Use $GITHUB_WORKSPACE for an absolute path to the deps file.
220+
(cd "$project_dir" && xargs -n 1 yarn add < "$GITHUB_WORKSPACE/deps_to_install.txt")
221221
git add "$project_dir/yarn.lock"
222222
else
223223
echo "Using npm to install/update dependencies in $project_dir..."
224-
# By running `npm install` for each package, we let npm handle adding or updating the dependency.
225-
(cd "$project_dir" && xargs -n 1 npm install < ../deps_to_install.txt)
224+
# Use $GITHUB_WORKSPACE for an absolute path to the deps file.
225+
(cd "$project_dir" && xargs -n 1 npm install < "$GITHUB_WORKSPACE/deps_to_install.txt")
226226
git add "$project_dir/package-lock.json"
227227
fi
228228
# Stage the manifest file that npm/yarn updated.

0 commit comments

Comments
 (0)