Skip to content

Drive Paths with special characters fail on "spago test" #1348

@thetraintomars

Description

@thetraintomars

If a drive (on OSX in my case) is named something like "Tim's Docs", spago test will fail to run:

file:///Volumes/Tim's%20Docs/Code/PureScript/my-proj/.spago/run.js:1
import { main } from 'file:///Volumes/Tim's Docs/Code/PureScript/my-proj/output/Test.Main/index.js'
^

SyntaxError: Unexpected identifier 's'
at compileSourceTextModule (node:internal/modules/esm/utils:344:16)
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:106:18)
at #translate (node:internal/modules/esm/loader:534:12)
at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:581:27)
at async ModuleJob._link (node:internal/modules/esm/module_job:116:19)

Node.js v23.11.0

Edits to run.js to escape the apostrophe are wiped out when spago test is run, it seems the file is regenerated every time. As a new user I could not find info on overriding this behavior.

I am attempting to run the first project from the tutorial.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions