lovell / lovell/sharp-libvips

Escape whitespace in build script

Open
#84 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Shell
Stars
212
Forks
132
Avg merge
5h 18m
Merged PRs (30d)
11

Description

I'm running into an issue when trying to use the build script on macOS.
My home folder is located on a non-standard location and the drives name includes whitespace.

$ echo $PWD         
/Volumes/Storage SSD/Users/thetw/Desktop/sharp-libvips

When i try to run the build script, every command that involves the unescaped absolute path to the build folder results in errors like:

mkdir: /Volumes/Storage: Permission denied
mkdir: SSD/Users/thetw/Desktop/sharp-libvips/build: No such file or directory

As you can see the unescaped path got split at the whitespace character which obviously creates invalid paths.

Do you have a clue how we could fix that? The only way that came to my mind so far is to properly escape all occurrences of the path invocations in the build script with " or '... or do i miss something?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the build script and reviewing every command that uses the absolute build path. Reproduce the issue from a macOS path containing whitespace, then verify that the script completes without splitting that path and that its build-directory commands succeed.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.