Comments (14)
I sync the settings on vscode and I use it on both Windows and Linux. To my surprise I found a binary with the name "C:\\Tools\\shfmt.exe"
on my home folder on Linux.
Most extensions that need an external binary either ask to provide the path if not found, or ask to download the needed tools (eg. go).
from vs-shell-format.
I suggest to bundle the binaries with the extension, this would prevent the extension from "downloading automatically" the files.
from vs-shell-format.
IIRC the binary was downloaded even when I set shellformat.path
. Anyway, this is a workaround at most, the extension should ask before downloading anything. (just as the official Rust plugin does)
from vs-shell-format.
fix on v6.1.2
from vs-shell-format.
you can just set the "shellformat.path": "/your/custompath"
from vs-shell-format.
👍good suggestion. you can pull request code.
from vs-shell-format.
Hi,
OTOH, regarding OP's observation, I'm good with the extension automatically fetching dependencies, unless there's a better way to handle custom installations of shfmt
on different platforms (GNU+Linux and macOS here).
Please don't remove this feature :)
from vs-shell-format.
Same issue here. I have shfmt
installed at /usr/local/bin/shfmt
. And my setting was like
{
"shellformat.path": "/usr/local/bin/shfmt",
}
But it still downloads shfmt
anytime I open a shell script. I hope this could be fixed. It is annoying.
Info:
Version: 1.38.1
Commit: b37e54c98e1a74ba89e03073e5a3761284e3ffb0
Date: 2019-09-11T13:31:32.854Z
Electron: 4.2.10
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Darwin x64 18.7.0, macOS 10.14.6
from vs-shell-format.
I definitely want it to download shfmt for me! It seemed to just do it again even though it was previously installed? Maybe I did not boot vs code for a few days. Using Fedora 29 Linux, latest vs code.
shfmt hasn't downloaded yet!Error: ENOENT: no such file or directory, stat '/home/david/.vscode/extensions/foxundermoon.shell-format-6.1.2/bin/shfmt_v2.6.4_linux_amd64'
Shfmt will be downloaded automatically!
download url: https://github.com/mvdan/sh/releases/download/v2.6.4/shfmt_v2.6.4_linux_amd64
download to: /home/david/.vscode/extensions/foxundermoon.shell-format-6.1.2/bin/shfmt_v2.6.4_linux_amd64
If the download fails, you can manually download it to the dest directory.
Or download to another directory, and then set the "shellformat.path" as the path
download shfmt page: https://github.com/mvdan/sh/releases
You can't use this plugin until the download is successful.
downloaded:[0.54%]
downloaded:[0.56%]
...
downloaded:[100.00%]
download success, You can use it successfully!
Suggestions or issues can be submitted here https://git.io/vsshell-issues
from vs-shell-format.
@foxundermoon this seems to still download without asking. I agree auto-downloading is super useful for some people, but like the Go extension or others do, it should ask first.
IMO It should also not be parsing all my paths to find the binary, if you run this
and its in the paths, it just runs, so there is no point in searching the PATH var
from vs-shell-format.
@pecigonzalo if you don't need auto-download , please set shellformat.path
configuration item.
searching PATH feature was deprecated. no longer supported!
from vs-shell-format.
@David-Else
because the shfmt binary file was saved under the extension directory. so after the extension updated will redownload. the old extension directory was cleared by vscode.
from vs-shell-format.
Was this changed? I can't find an entry in the changelog or in the commit log that matches this issue.
from vs-shell-format.
VSCode released support for platform specific extensions. I think it's just what this extension would need.
from vs-shell-format.
Related Issues (20)
- How to fix zshrc multiple lines string problem
- line breaks when semicolon included HOT 1
- I got an error with "Invalid shfmt path in extension configuration:" HOT 1
- CI/CD automate publishing to Open-VSX.org HOT 1
- var[${index}-string] incorrectly expanded with whitespaces
- `"editor.formatOnSave": false` doesn't appear to be respected HOT 2
- Bug: trailing backslash removed in Dockerfile HOT 6
- Provide settings to ignore files for example .gitconfig
- quoting issues using the formatter
- Possible Issue - shfmt on Windows does not Format CRLF Files HOT 1
- Scripts and startup files (no `.sh` suffix) are not supported. HOT 3
- Windows Batch HOT 1
- Bundle full changelog with your extension HOT 2
- Antivirus issue
- .env file lost syntax highlighting HOT 1
- all_proxy is a invalid var name
- parameter expansion requires a literal
- IntelliSense Optimization
- Bug: case HOT 1
- Command arguments are being indented at the same level as the parent HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vs-shell-format.