Giter Club home page Giter Club logo

Comments (14)

lpic10 avatar lpic10 commented on May 28, 2024 4

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.

felipecrs avatar felipecrs commented on May 28, 2024 3

I suggest to bundle the binaries with the extension, this would prevent the extension from "downloading automatically" the files.

from vs-shell-format.

marmistrz avatar marmistrz commented on May 28, 2024 2

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.

foxundermoon avatar foxundermoon commented on May 28, 2024 1

fix on v6.1.2

from vs-shell-format.

foxundermoon avatar foxundermoon commented on May 28, 2024

you can just set the "shellformat.path": "/your/custompath"

from vs-shell-format.

foxundermoon avatar foxundermoon commented on May 28, 2024

👍good suggestion. you can pull request code.

from vs-shell-format.

cig0 avatar cig0 commented on May 28, 2024

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.

singularitti avatar singularitti commented on May 28, 2024

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.

David-Else avatar David-Else commented on May 28, 2024

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.

pecigonzalo avatar pecigonzalo commented on May 28, 2024

@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.

foxundermoon avatar foxundermoon commented on May 28, 2024

@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.

foxundermoon avatar foxundermoon commented on May 28, 2024

@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.

SuperSandro2000 avatar SuperSandro2000 commented on May 28, 2024

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.

felipecrs avatar felipecrs commented on May 28, 2024

VSCode released support for platform specific extensions. I think it's just what this extension would need.

https://code.visualstudio.com/api/working-with-extensions/publishing-extension#platformspecific-extensions

from vs-shell-format.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.