Skip to content

Commit 2f9673b

Browse files
authored
fix: Preliminary path.relative workaround (#1399)
1 parent 7de4745 commit 2f9673b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.github/workflows/test.yml

+6
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ jobs:
6868
exit 1
6969
fi
7070
npm test
71+
- name: Test browser build
72+
run: node tests/browser-asc
7173
test-windows:
7274
name: "Compiler (Windows, node current)"
7375
runs-on: windows-latest
@@ -87,6 +89,8 @@ jobs:
8789
run: npm run build
8890
- name: Test distribution
8991
run: npm test
92+
- name: Test browser build
93+
run: node tests/browser-asc
9094
test-macos:
9195
name: "Compiler (MacOS, node current)"
9296
runs-on: macos-latest
@@ -106,6 +110,8 @@ jobs:
106110
run: npm run build
107111
- name: Test distribution
108112
run: npm test
113+
- name: Test browser build
114+
run: node tests/browser-asc
109115
test-features:
110116
name: "Features"
111117
runs-on: ubuntu-latest

cli/asc.js

+3
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,11 @@ exports.main = function main(argv, options, callback) {
351351

352352
// returns a relative path from baseDir
353353
function makeRelative(arg) {
354+
// FIXME: see https://github.com/AssemblyScript/assemblyscript/issues/1398
355+
if (baseDir === ".") return arg;
354356
return path.relative(baseDir, arg);
355357
}
358+
356359
// postprocess we need to get absolute file locations argv
357360
argv = unique(argv.map(resolveBasedir)).map(makeRelative);
358361

0 commit comments

Comments
 (0)