Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

makesure fails when wget is not available #22

Closed
alisonatwork opened this issue Dec 11, 2023 · 5 comments
Closed

makesure fails when wget is not available #22

alisonatwork opened this issue Dec 11, 2023 · 5 comments
Assignees
Milestone

Comments

@alisonatwork
Copy link

alisonatwork commented Dec 11, 2023

Follow-up to #20 - the TMPDIR is now fixed on Windows/Git Bash, but the build still fails to run in an unexpected way.

$ ./makesure
  goal 'tush_installed' [already satisfied].
  goal 'tested_by@tush@./fhtagn.awk' ...
Testing with tush (./fhtagn.awk)...
TESTS PASSED : tests/fhtagn.tush
  goal 'tested_by@tush@./fhtagn.awk' took 2.613 s
  goal 'tested_by@fhtagn@./fhtagn.awk' ...
Testing with fhtagn (./fhtagn.awk)...
TESTS PASSED : tests/fhtagn.tush
  goal 'tested_by@fhtagn@./fhtagn.awk' took 2.316 s
  goal 'tested_by_default_awk' [empty].
  goal 'soft_folder_created' [already satisfied].
  goal 'installed_bwk' ...

Fetching BWK...

bash: line 13: wget: command not found
  goal 'installed_bwk' failed
  goal 'installed_bwk' took 0.064 s
  total time 5.214 s
$ command -v curl
/mingw64/bin/curl
$ command -v wget
$

Elsewhere in the Makesurefile, where it fetches tush, there is a wget-fallback-to-curl logic, but when it tries to fetch BWK that fallback is gone. The truth is this is never going to work in Git Bash anyway because there is no toolchain to compile the other awks, but since the fallback to curl was written once perhaps it might be nice to make a generic fallback that works everywhere.

@xonixx
Copy link
Owner

xonixx commented Dec 11, 2023

Yes you are right on both. Let me think on what can be done.

@alisonatwork
Copy link
Author

Yeah, I was thinking that since makesure internally has a fallback for this, perhaps there is a way to add fetching a file from the web as a dependency some kind of directive in the Makesurefile, but not sure if that's making the DSL too complex? I haven't really dug too deep into how makesure works so I can't help much.

@xonixx
Copy link
Owner

xonixx commented Dec 11, 2023

Btw, what are you trying to achieve by running ./makesure? The only thing this is intended to do currently - is to run a test suite?

Do you want to install the tool maybe?

@alisonatwork
Copy link
Author

Oh I'm not trying to achieve anything in particular, I just reported the ticket because it's something I noticed while playing around. My original motivator was to try out gron.awk which I saw in a comment on HN. That led me to explore some of the other tools in the suite. I really like the concept of having small tools that work the same across a bunch of operating systems, especially ones that don't require compilation or installing a whole separate interpreter.

@xonixx
Copy link
Owner

xonixx commented Dec 13, 2023

Ok I made it by default only test with the default awk. So now ./makesure works on Win as well. For testing with all awks now we have ./makesure testall - only works on Linux. Thank you for pointing to this problem on Windows, @alisonatwork.

@xonixx xonixx closed this as completed Dec 14, 2023
@xonixx xonixx self-assigned this Jan 7, 2024
@xonixx xonixx added this to the 0.1.1 milestone Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants