From 9c77d1b41f441d2a1841b83ffb4b4ec156534786 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Mon, 30 Mar 2020 22:03:22 +0200 Subject: [PATCH] Prefer path.delimiter to the hardcoded value --- dist/index.js | 3 ++- windows.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index ea917a123..23afb2715 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4801,6 +4801,7 @@ __webpack_require__.r(__webpack_exports__); // https://github.com/MSP-Greg/actions-ruby/blob/master/lib/main.js const fs = __webpack_require__(747) +const path = __webpack_require__(622) const cp = __webpack_require__(129) const core = __webpack_require__(470) const exec = __webpack_require__(986) @@ -4940,7 +4941,7 @@ function addVCVARSEnv() { for (let [k, v] of newEnv) { if (process.env[k] !== v) { if (k === 'Path') { - newPathEntries = v.replace(process.env['Path'], '').split(';') + newPathEntries = v.replace(process.env['Path'], '').split(path.delimiter) } else { core.exportVariable(k, v) } diff --git a/windows.js b/windows.js index 0f5b52a7f..c3a15dec7 100644 --- a/windows.js +++ b/windows.js @@ -2,6 +2,7 @@ // https://github.com/MSP-Greg/actions-ruby/blob/master/lib/main.js const fs = require('fs') +const path = require('path') const cp = require('child_process') const core = require('@actions/core') const exec = require('@actions/exec') @@ -141,7 +142,7 @@ export function addVCVARSEnv() { for (let [k, v] of newEnv) { if (process.env[k] !== v) { if (k === 'Path') { - newPathEntries = v.replace(process.env['Path'], '').split(';') + newPathEntries = v.replace(process.env['Path'], '').split(path.delimiter) } else { core.exportVariable(k, v) }