Skip to content

run.sh doesn't escape $SCRIPTPATHs with spaces in them #2974

@vitorio

Description

@vitorio

I'm running Etherpad from an external USB drive, which when automounted gets the path /media/My Book. bin/run.sh bombs out from this location with the error:

Started Etherpad...

module.js:340
    throw err;
          ^
Error: Cannot find module '/media/My'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3

However, running node directly, e.g. node node_modules/ep_etherpad-lite/node/server.js works fine.

Adding quotes to the last line of bin/run.sh seems to fix the problem, although I'm sure there are other ways to properly escape these paths: exec node "$SCRIPTPATH/node_modules/ep_etherpad-lite/node/server.js" $*

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