Skip to content

Spaces and other special characters in current directory path prevent Qlever setup-config and ui from running #248

@GravityCore

Description

@GravityCore

If current directory's path contains spaces or any non-ASCII characters, then qlever setup-config and qlever ui fail.

Example error:

/bin/sh: 1: Syntax error: "(" unexpected
Could not copy "Qleverfile" to current directory: Command 'cat /mnt/c/Users/user/Problematic Spot/.venv/lib/python3.12/site-packages/qlever/Qleverfiles/Qleverfile.olympics | sed -E 's/(^ACCESS_TOKEN.*)/\1_LTOJSodzA4PM/'> Qleverfile' returned non-zero exit status 2.

Fix is simple: use quotes around all user-inputted paths (or all paths in general). So from

f"cat {qleverfile_path}"

change to:

f'cat "{qleverfile_path}"'

and

f"--volume $(pwd):/app/db "

change to:

f'--volume "$(pwd):/app/db" '

Other run commands that might be affected:
https://github.com/search?q=repo%3Aqlever-dev%2Fqlever-control+path%3Acommands+%22cat+%22&type=code
https://github.com/search?q=repo%3Aqlever-dev%2Fqlever-control+path%3Acommands+%22cd+%22&type=code

Might be a problem in other commands as well.

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