Skip to content
This repository was archived by the owner on Dec 2, 2026. It is now read-only.
This repository was archived by the owner on Dec 2, 2026. It is now read-only.

postinstall does not work on Windows #976

Closed

Description

@winstliu

The postinstall script is currently executing (as of #972) bash postinstall.sh. For obvious reasons, this won't work when attempting to install nodegit through cmd.exe. This commit in particular seems pretty ironic 😦.

Here's an installation log (while trying to build Atom, but that shouldn't matter):

Installing modules failed
> atom@1.8.0-dev preinstall
C:\Users\username\Documents\GitHub\atom
> node -e 'process.exit(0)'
​
​
> nodegit@0.12.0 install C:\Users\username\Documents\GitHub\atom\node_modules\nodegit
> node lifecycleScripts/install
​
[nodegit] Fetching binary from S3.
[nodegit] Completed installation successfully.
​
> nodegit@0.12.0 postinstall C:\Users\username\Documents\GitHub\atom\node_modules\nodegit
> bash postinstall.sh
​
​
npm WARN engine nodegit@0.12.0: wanted: {"node":">= 0.12"} (current: {"node":"0.10.40","npm":"2.13.3"})
'bash' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! Windows_NT 6.2.9200
npm ERR! argv "C:\\Users\\username\\Documents\\GitHub\\atom\\apm\\node_modules\\atom-package-manager\\bin\\node.exe" "C:\\Users\\username\\Documents\\GitHub\\atom\\apm\\node_modules\\atom-package-manager\\node_modules\\npm\\bin\\npm-cli.js" "--globalconfig" "C:\\Users\\username\\.atom\\.apm\\.apmrc" "--userconfig" "C:\\Users\\username\\.atom\\.apmrc" "install" "--target=0.36.8" "--arch=ia32" "--msvs_version=2015"
npm ERR! node v0.10.40
npm ERR! npm  v2.13.3
npm ERR! code ELIFECYCLE
​
npm ERR! nodegit@0.12.0 postinstall: `bash postinstall.sh`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nodegit@0.12.0 postinstall script 'bash postinstall.sh'.
npm ERR! This is most likely a problem with the nodegit package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     bash postinstall.sh
npm ERR! You can get their info via:
npm ERR!     npm owner ls nodegit
npm ERR! There is likely additional logging output above.

Activity

  1. johnhaley81 commented on Mar 30, 2016

    @johnhaley81
    Collaborator

    @50Wliu does #978 solve your issue?

  2. winstliu commented on Mar 30, 2016

    @winstliu
    Author

    @johnhaley81 At a glance it looks like it should, as bash is no longer invoked.

  3. ankitgo commented on Mar 30, 2016

    @ankitgo

    Running into same issue. Any timeline for the fix?

  4. johnhaley81 commented on Mar 30, 2016

    @johnhaley81
    Collaborator

    Just published 0.12.1 which fixes this.

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