Skip to content
This repository was archived by the owner on Sep 25, 2025. It is now read-only.
This repository was archived by the owner on Sep 25, 2025. It is now read-only.

Handling symlinks on Windows #465

Closed

Description

@ojeytonwilliams

@paizle 's issue seems to be related to Git Bash + Windows and probably because there's a symlink involved.

image

@ojeytonwilliams do we think using the literal path instead of a symlink is likely to fix one environment and break others? If so, perhaps we break that into a new issue.

I found some chat about the escaping of characters being an issue / bug with Git Bash on Windows so symlink and/or escaping seems like they could the what's breaking Git Bash.

Originally posted by @allella in #461 (comment)

Activity

  1. paizle commented on Mar 29, 2021

    @paizle
    Contributor

    I think enabling symlinks did the trick. I just had to re-install Git Bash with the symlink option checked.

    This works fine now:
    "typeorm": "ts-node -P tsconfig.server.json ./node_modules/.bin/typeorm",

    Subsequently, I tried the following but node still complained about the single quotes:
    "both": "concurrently 'npm run dev' 'cd client && npm run dev'",

    Relevant error:
    npm ERR! [email protected] both: concurrently 'npm run dev' 'cd client && npm run dev'

  2. ojeytonwilliams commented on Mar 29, 2021

    @ojeytonwilliams
    ContributorAuthor

    Okay, awesome, thanks @paizle. Would you mind creating a PR with a brief addition to the docs? Since you've just done this, I think you're best placed to explain the required steps.

    Regarding the single quotes, I've kept your suggestion in #461, so that will get resolved.

  3. allella commented on Mar 29, 2021

    @allella
    Contributor

    @paizle I can add something to the "Running the Application" Step 1 with a note and link about Git Bash requiring the symlink option.

    Sound good?

  4. allella commented on Mar 29, 2021

    @allella
    Contributor

    @paizle it looks like Git Bash symlinks can be enabled on a per clone basis instead of turned on by default.

    git clone -c core.symlinks=true <URL>

    There are some reasons listed as to why Git Bash symlinks are not enabled by default on that page.

    Could you re-install Git Bash with the symlinks turned off and then try a fresh clone of the Chapter repository using the -c core.symlinks=true option shown above, and let us know if that works?

  5. allella commented on Mar 29, 2021

    @allella
    Contributor

    There are also Windows permissions involved.

    If the last comment doesn't work, then it looks like enabling Developer Mode in Windows will correct any permissions issues related to symlinks and Git For Windows / Git Bash / Github Desktop

  6. paizle commented on Mar 29, 2021

    @paizle
    Contributor

    @paizle it looks like Git Bash symlinks can be enabled on a per clone basis instead of turned on by default.

    git clone -c core.symlinks=true <URL>

    There are some reasons listed as to why Git Bash symlinks are not enabled by default on that page.

    Could you re-install Git Bash with the symlinks turned off and then try a fresh clone of the Chapter repository using the -c core.symlinks=true option shown above, and let us know if that works?

    Ok, re-installed Git Bash without the symlinks and I gave this a try both with and without the core.symlinks config option and both worked.

    I tried rebooting and different install options for Git Bash just trying to break it again but alas I could not.

    I did have symlinks feature turned off before so I'm not sure what the problem actually was. Possibly it was the newer version of Git Bash that fixed my issues. I'm not sure.

    Seems fine now.

  7. allella commented on Mar 29, 2021

    @allella
    Contributor

    @paizle I have a fresh Windows laptop I just setup for testing things. I'll give it a try.

    At least now we know with some certainty there are symlink, Windows permissions, and character escaping issues with Git for Windows / Git Bash / Github Desktop (built on top of on the former).

    It would be good to figure out how to replicate the errors consistently so we know whatever goes in the docs isn't still going to break others.

  8. allella commented on Mar 29, 2021

    @allella
    Contributor

    @paizle one other thing that controls the symlinks is the global config file.

    I suspect checking the box during the install saves to C:\ProgramData\Git\config so that's another variable we could look at to figure out what's going on.

  9. paizle commented on Mar 29, 2021

    @paizle
    Contributor

    @paizle one other thing that controls the symlinks is the global config file.

    I suspect checking the box during the install saves to C:\ProgramData\Git\config so that's another variable we could look at to figure out what's going on.

    Testing on a fresh windows laptop sounds like a good idea at this point.

  10. allella commented on Mar 30, 2021

    @allella
    Contributor

    I installed Git for Windows v2.31.1 with the defaults, with symlinks unchecked and confirmed the core.symlinks=false in /etc/gitconfig (also C:\ProgramData\Git\etc\gitconfig) configuration file(s).

    I started to install Docker and still waiting on hours of Windows updates before I can install Docker.

    #466 includes my notes from running through this as a Windows users.

    I'll addressed the symlink / Git Bash part of this issue once I get Docker installed and see if get any issues with Git Bash, or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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