Skip to content

Idea diff not opening if files contain spaces #136

@mkutz

Description

@mkutz

When using the following configuration

defaultFileReviewerScript = idea diff "{receivedFile}" "{approvedFile}"

Idea's diff view does not open as expected if the received and/or approved filenames contain any spaces.

Ultimately this is a bug in the script generated by JetBrains Toolbox TBX-7783.

That script uses MacOS' open command, which doesn't seem to like quoted spaces in filenames.

E.g. while this works:

meld "path/to file/with spaces-received.txt""path/to file/with spaces-approved.txt"

These do not:

open -na "meld" --args "path/to file/with spaces-received.txt" "path/to file/with spaces-approved.txt"
open -na "meld" --args path/to\ file/with\ spaces-received.txt path/to\ file/with\ spaces-approved.txt

The latter works when using absolute paths.

open -na "meld" --args ~/Projects/path/to\ file/with\ spaces-received.txt ~/Projects/path/to\ file/with\ spaces-approved.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions