Skip to content

Commit

Permalink
fix for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
spg-puw committed Oct 10, 2023
1 parent 2550cb1 commit 1ce419c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion aufgabe1.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ function main() {
}

export default { main, array10, einMotorrad, einAnderesMotorrad, greet1, greet2, greet3, quadratBerechnen, potenzBerechnenUndHalbieren, anzahlDerElementeImArray, memoryString, sinnlos }
if (import.meta.url.endsWith(process.argv[1])) {
import { pathToFileURL as _path } from 'url'
if (import.meta.url === _path(process.argv[1]).href) {
main();
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"start": "node aufgabe1.mjs",
"aufgabe1": "node aufgabe1.mjs",
"test": "cross-env NODE_OPTIONS='--experimental-vm-modules --no-warnings' jest"
"test": "cross-env NODE_OPTIONS='--experimental-vm-modules' NODE_NO_WARNINGS=1 jest"
},
"author": "",
"license": "ISC",
Expand Down

0 comments on commit 1ce419c

Please sign in to comment.