Unverified Commit 9d5ef57a authored by Gergő Gutyina's avatar Gergő Gutyina Committed by GitHub
Browse files

pnpmConfigHook: disable version management before any execution of pnpm commands (#503118)

parents 0664caad 4f0a7d18
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -17,6 +17,12 @@ pnpmConfigHook() {
      exit 1
    fi

    # If the packageManager field in package.json is set to a different pnpm version than what is in nixpkgs,
    # any pnpm command would fail in that directory, the following disables this
    pushd $HOME
    pnpm config set manage-package-manager-versions false
    popd

    echo "Found 'pnpm' with version '$(pnpm --version)'"

    fetcherVersion=$(cat "${pnpmDeps}/.fetcher-version" || echo 1)
@@ -37,13 +43,6 @@ pnpmConfigHook() {

    chmod -R +w "$STORE_PATH"


    # If the packageManager field in package.json is set to a different pnpm version than what is in nixpkgs,
    # any pnpm command would fail in that directory, the following disables this
    pushd $HOME
    pnpm config set manage-package-manager-versions false
    popd

    pnpm config set store-dir "$STORE_PATH"

    # Prevent hard linking on file systems without clone support.