Skip to content

Commit

Permalink
Fix construct_env space handling (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianpurvis authored Feb 1, 2021
1 parent ca33dc6 commit 814326c
Show file tree
Hide file tree
Showing 12 changed files with 3,117 additions and 28 deletions.
8 changes: 8 additions & 0 deletions ava.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default {
'extensions': [
'ts'
],
'require': [
'ts-node/register'
]
};
20 changes: 16 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const tc = __importStar(__webpack_require__(7784));
const cache = __importStar(__webpack_require__(7799));
const os = __importStar(__webpack_require__(2087));
const fs = __importStar(__webpack_require__(5747));
const matchers_1 = __webpack_require__(964);
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
Expand Down Expand Up @@ -110,14 +111,12 @@ function run() {
}
yield exec.exec(`${emsdk} activate ${emArgs.version}`);
const envListener = (message) => {
const pathRegex = new RegExp(/PATH \+= (\S+)/);
const pathResult = pathRegex.exec(message);
const pathResult = matchers_1.pathRegex.exec(message);
if (pathResult) {
core.addPath(pathResult[1]);
return;
}
const envRegex = new RegExp(/(\S+) = (\S+)/);
const envResult = envRegex.exec(message);
const envResult = matchers_1.envRegex.exec(message);
if (envResult) {
core.exportVariable(envResult[1], envResult[2]);
return;
Expand All @@ -138,6 +137,19 @@ function run() {
run();


/***/ }),

/***/ 964:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.envRegex = exports.pathRegex = void 0;
exports.pathRegex = new RegExp(/PATH \+= (.+)/);
exports.envRegex = new RegExp(/(\S+) = (.+)/);


/***/ }),

/***/ 7799:
Expand Down
Loading

0 comments on commit 814326c

Please sign in to comment.