joshwcomeau / guppy

🐠A friendly application manager and task runner for React.js
ISC License
3.27k stars 154 forks source link

Update path in settings modal continues to fail #320

Closed melanieseltzer closed 5 years ago

melanieseltzer commented 5 years ago

Describe the bug

We just merged #295 and I'm coming across this weird issue where if you enter a bad path and then correct it (by typing), the path checker will get stuck and it won't let you save even if the path in the input is now correct.

This happens on Mac but @AWolf81 reported he cannot reproduce on Windows.

I might look into it more myself but if anyone else wants to in the meantime go ahead.

To Reproduce

  1. Click on Preferences in the menu to bring up the app settings modal
  2. Change the default path to something wrong, by typing it into the input
  3. Click save. Error throws as expected.
  4. Correct the path to something that you know exists. Click save.
  5. Error still throws even though path is correct.

Expected behavior

Successfully update the path.

melanieseltzer commented 5 years ago

Looked into this more and it's due to replacing the leading slash. Works perfect for me without it. PR incoming.