Main icon indicating copy to clipboard operation
Main copied to clipboard

fix: lf: add lfcd to shims

Open Valinor opened this issue 3 years ago • 4 comments

see the issue for details on the typos fixed

fixes issue #3796

Closes #3796

Valinor avatar Sep 02 '22 06:09 Valinor

Would be better to download these in the URL field itself. The ps1 script should also be added

rashil2000 avatar Sep 04 '22 20:09 rashil2000

We should copy the .cmd and .ps1 scripts (as you had done earlier), so that they are directly accessible and don't get overwritten

rashil2000 avatar Sep 06 '22 06:09 rashil2000

We should copy the .cmd and .ps1 scripts (as you had done earlier), so that they are directly accessible and don't get overwritten

instead of use post_install, I use the bin part to create shims from cmd and ps1, isn't that a better solution?

Valinor avatar Sep 08 '22 05:09 Valinor

No, because:

  • lfcd.cmd will create lfcd.cmd and lfcd (sh script)
  • lfcd.ps1 will create lfcd.cmd (which will overwrite the one created above), lfcd (sh script) ((which will again overwrite the one created above) and lfcd.ps1

So you see there'll be no use of creating shell-specific shims this way. That's why we need to copy them instead.

rashil2000 avatar Sep 08 '22 15:09 rashil2000

@rashil2000 I restored the shim copy to pre_install and moved the removal to post_uninstall. It's in post_uninstall so that if you uninstall while lf.exe is still running and try again after closing it, Scoop won't complain that the shims don't exist because they've already been deleted. Could you take a look?

tech189 avatar Nov 12 '22 10:11 tech189

Perfect!

rashil2000 avatar Nov 12 '22 13:11 rashil2000