Comments (3)
This approach is not currently possible because.chezmoiexternal.toml
uses paths as keys and TOML does not allow duplicate keys.
You need to make the keys unique, which you would normally do by including the version number in the path. Unfortunately, it looks like the .NET SDKs do not include the version number in the root path (e.g. it puts files in ./packs/Microsoft.NETCore.App.Ref/8.0.1/
, not in ./8.0.1/packs/Microsoft.NETCore.App.Ref/
). Furthermore the .NET SDKs include files in the root path (like ./ThirdPartyNotices.txt
) so trying to install multiple .NET SDKs in the same directory will lead to conflicts in these files.
The .NET SDKs are also 200MB compressed and 566MB uncompressed so you should not manage them with a chezmoi external because it will make chezmoi apply
very slow as it has to both unpack the archive and check that the uncompressed contents match the 566MB of files on disk every time you run chezmoi apply
.
So, use a run_once_
script to install the SDKs instead. I would create one run_once_
script for each version of the .NET SDK.
from chezmoi.
What you want to do is not supported by externals. The definition of externals is a map where each key must be unique and does not support multiple URLs (if such were supported, it would not be clear to me whether those should be interpreted as "download and extract from all of these files" or "download and extract from one of these files; the others are mirror fallbacks").
I don't know anything about the .NET SDK, but some quick searching suggests that a .NET Core SDK is ~/.local/share/dotnet/sdk/VERSION
. If the archives contain sdk/VERSION
, then you should specify this as:
[".local/share/dotnet/sdk/VERSION1"]
url = "version1URL"
type = "archive"
stripComponents = 2
[".local/share/dotnet/sdk/VERSION2"]
url = "version2URL"
type = "archive"
stripComponent = 2
If the archives just contain VERSION
, then stripComponents = 1
.
from chezmoi.
Ah, okay. Thanks for the feedback! I suspected it wasn't possible, but I was also aware of the fact that I simply may not have found the correct way to do it.
It sounds like the run_once_
script is the way to go.
from chezmoi.
Related Issues (20)
- Powershell one-line install on Windows 11 error - update script at https://get.chezmoi.io/ps1 HOT 1
- run time bug when `chezmoi doctor` invoked HOT 6
- Make accidental removal harder
- forced update says "Already up to date." HOT 1
- Ability to dry-run / diff scripts HOT 5
- Local repository. HOT 7
- Documentation update "Why do I get a blank buffer or empty file when running chezmoi edit" HOT 1
- Import/merge separate source directories? HOT 2
- Set command line options via environment variables HOT 1
- Precedence of .chezmoiremove vs. exact_ attributes? HOT 1
- SOPS Support HOT 6
- Config variables `autoAdd = true` and `autoCommit = true` don't seem to add or commit changes HOT 2
- bitwarden and bitwardenFields template functions seems not working HOT 2
- Optional speed up to chezmoi doctor
- Chezmoi cd exits git bash in windows terminal HOT 2
- promptString is not yielding the expected result HOT 5
- Raspberry Pi Illegal Operation HOT 2
- Flag --managed to `add` all managed files HOT 4
- Release appears to be corrupt HOT 2
- Adding .local/bin hangs 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 chezmoi.