kritzcreek / pscid

A lightweight, fast and unintrusive PureScript file-watcher
GNU Lesser General Public License v3.0
133 stars 16 forks source link

Full build incorrectly uses pulp in Spago project #62

Closed evanrelf closed 5 years ago

evanrelf commented 5 years ago

When running a full build using the B key, an error is thrown. It seems it's incorrectly decided I'm not in a Spago project, and so it's trying to run pulp, which I don't have installed.

Tested with 2.8.0, 2.8.1, and 2.8.2 with the working directory set to the root of the project (where the spago.dhall file resides). Runs spago correctly* on 2.8.0, fails trying to run pulp on 2.8.1 and above.

The problem started after this commit changed isSpagoProject: https://github.com/kRITZCREEK/pscid/commit/f30ecf43d6a584942e2362d9df97d419897a553e.

* Not fully correctly... https://github.com/kRITZCREEK/pscid/issues/55: Runs spago build in non-spago project

events.js:180
      throw er; // Unhandled 'error' event
      ^

Error: spawn pulp ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:77:11)
Emitted 'error' event at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:77:11) {
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'spawn pulp',
  path: 'pulp',
  spawnargs: [ 'build' ]
}
kritzcreek commented 5 years ago

Thanks for the report I think I fixed it in 9c9ff422215bc792549771ef332c48be5f35b752, could you try 2.8.3?

kritzcreek commented 5 years ago

Ping @evanrelf

evanrelf commented 5 years ago

Sorry, I got caught up with other stuff.

Just tried v2.8.3 under the same circumstances as before, and it's working! Thank you.

kritzcreek commented 5 years ago

Thanks, great!