Skip to content

Nar breaks if there is a space in the path to the source #225

@SteveSmith16384

Description

@SteveSmith16384

If there is a space in the path to the source, then the build breaks quite soon with something like:-

[INFO] --- nar-maven-plugin:3.2.0:nar-gnu-configure (default-nar-gnu-configure) @ TCSFirmware ---
[INFO] Copying GNU sources
[INFO] Running GNU configure
[INFO] + chmod +x /media/stephen/SSD Drive/code/xia/firmware/target/nar/gnu/amd64-Linux-gpp/src/configure
[INFO] args: [/media/stephen/SSD Drive/code/xia/firmware/target/nar/gnu/amd64-Linux-gpp/src/configure, --prefix=/media/stephen/SSD Drive/code/xia/firmware/target/nar/gnu/amd64-Linux-gpp/target, --prefix=/media/stephen/SSD, Drive/code/xia/firmware/target/hex]
[INFO] + cd /media/stephen/SSD Drive/code/xia/firmware/target/nar/gnu/amd64-Linux-gpp/src
[INFO] + sh /media/stephen/SSD Drive/code/xia/firmware/target/nar/gnu/amd64-Linux-gpp/src/configure --prefix=/media/stephen/SSD Drive/code/xia/firmware/target/nar/gnu/amd64-Linux-gpp/target --prefix=/media/stephen/SSD Drive/code/xia/firmware/target/hex
[ERROR] /media/stephen/SSD Drive/code/xia/firmware/target/nar/gnu/amd64-Linux-gpp/src/configure: 12: test: x--prefix=/media/stephen/SSD: unexpected operator

.. which leads to lots of further errors. This seems to be cause by the function MakeExecutable() in NarUtils.jar (among other places) not wrapping the path in apostrophes when it runs the chmod command.

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