Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

How to disable some steps via config file? #1008

Open
mouse07410 opened this issue Sep 18, 2022 · 2 comments
Open

How to disable some steps via config file? #1008

mouse07410 opened this issue Sep 18, 2022 · 2 comments

Comments

@mouse07410
Copy link

Environment

  • macOS Monterey 12.6
  • MacPorts installed
  • TexLive-2022 (from MacTeX, not via Macports) installed
  • Current Rust installed (via "rustup")
  • Current Haskell (GHC-9.4.2, Cabal-3.8.1.0, etc) installed via "ghcup"

I want another step added

Specifically, to update Haskell stuff. Something like

ghcup upgrade
ghcup install hls
cabal update

I want to suggest some general feature

Topgrade should allow automatically skipping steps that user specifies in the top grade config file.

For example, I don't want "topgrade" to check or perform system update, and I don't want it to update NPM.

disable ["system", "npm", "bin"] did not help - "topgrade" still tried all of the above (some of which necessarily failed).

More information

@stefanhusmann
Copy link

This is supported, but you need to be careful. disable ["system", "node"] should work, but "npm" is the wrong keyword, and "bin" is not defined at all (btw., what should it do)?

@mouse07410
Copy link
Author

and "bin" is not defined at all (btw., what should it do)?

"bin" shouldn't do anything, but on my system it was trying to locate file $HOME/bin/bin and execute it, then complaining when it's not found. It also created a dummy/bad $HOME/bin/bin. I promptly deleted it, and added "bin" to "exclude" - which remedied the problem. And, of course "npm" is referred to as "node" (which was not obvious to me).

Here's what my current config has (BTW, it would be nice if topgrade offered the flag to just display the current config, without changing/editing it):

.  .  .
disable = ["system", "node", "containers", "bin", "vcpkg"]
.  .  .
[commands]
#"Python Environment" = "~/dev/.env/bin/pip install -i https://pypi.python.org/simple -U --upgrade-strategy eager jupyter"
"Haskell" = "ghcup upgrade && ghcup install hls && stack update && cabal update && hoogle generate"

Anyway, now it seems to work, thank you for a nice package.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants