Skip to content

use of IFS= breaks GfW #64

Open
Open
@r2evans

Description

@r2evans

This is a formalization of troubleshooting made while investigating #60.

The issue is with IFS= and windows' propensity to use C: at the start of paths.

For instance, consider this:

echo -e "executable is [$0]"
echo "dirname is [$(dirname $0)/../lib]"

If added to git-issue.sh before (< 33) or after (> 51) the block of code that overrides IFS, I see

executable is [C:/Users/r2/AppData/Roaming/git-issue/bin/git-issue]
dirname is [C:/Users/r2/AppData/Roaming/git-issue/bin/../lib]

but between lines 33 and 51 (around your LIB_PATH code where IFS=":" temporarily), I see

executable is [C:/Users/r2/AppData/Roaming/git-issue/bin/git-issue]
dirname0 is [.
/Users/r2/AppData/Roaming/git-issue/bin]

The easy looping of LIB_PATH by using IFS is broken by that executable.

(I thought having this as a separate issue would do better to track the problem, vice discussing too long within the PR.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions