Main
                                
                                
                                
                                    Main copied to clipboard
                            
                            
                            
                        fix: lf: add lfcd to shims
see the issue for details on the typos fixed
fixes issue #3796
Closes #3796
- [x] I have read the Contributing Guide.
 
Would be better to download these in the URL field itself. The ps1 script should also be added
We should copy the .cmd and .ps1 scripts (as you had done earlier), so that they are directly accessible and don't get overwritten
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?
No, because:
lfcd.cmdwill createlfcd.cmdandlfcd(sh script)lfcd.ps1will createlfcd.cmd(which will overwrite the one created above),lfcd(sh script) ((which will again overwrite the one created above) andlfcd.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 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?
Perfect!