Skip to content

Commit 2ebd17b

Browse files
MSP-Gregeregon
authored andcommitted
Update runtime logging of Path adjustments, show additions
1 parent 9f177f2 commit 2ebd17b

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

common.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,17 +154,17 @@ export function setupPath(newPathEntries) {
154154
const originalPath = process.env[envPath].split(path.delimiter)
155155
let cleanPath = originalPath.filter(entry => !/\bruby\b/i.test(entry))
156156

157+
core.startGroup(`Modifying ${envPath}`)
158+
157159
// First remove the conflicting path entries
158160
if (cleanPath.length !== originalPath.length) {
159-
core.startGroup(`Cleaning ${envPath}`)
160-
console.log(`Entries removed from ${envPath} to avoid conflicts with Ruby:`)
161+
console.log(`Entries removed from ${envPath} to avoid conflicts with default Ruby:`)
161162
for (const entry of originalPath) {
162163
if (!cleanPath.includes(entry)) {
163164
console.log(` ${entry}`)
164165
}
165166
}
166167
core.exportVariable(envPath, cleanPath.join(path.delimiter))
167-
core.endGroup()
168168
}
169169

170170
// Then add new path entries using core.addPath()
@@ -176,5 +176,13 @@ export function setupPath(newPathEntries) {
176176
} else {
177177
newPath = newPathEntries
178178
}
179+
console.log(`Entries added to ${envPath} to use selected Ruby:`)
180+
for (const entry of newPath) {
181+
if (!cleanPath.includes(entry)) {
182+
console.log(` ${entry}`)
183+
}
184+
}
185+
core.endGroup()
186+
179187
core.addPath(newPath.join(path.delimiter))
180188
}

dist/index.js

Lines changed: 11 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)