Skip to content

Show command executed by 'basalt build --test'

Alex requested to merge alexfmpe/basalt:show-command into develop

Summary

I often want to run the build with less jobs so basalt doesn't DoS me. This allows a simple triple-click at the logs start to get the underlying command.

Without this PR I need to jump through some hoops to get the running command from htop or something.

Somewhat related, maybe extra args could be forwarded via the -- idiom?

$ basalt build --test
Basalt target missing, assuming NixOS
Executing the following command:
/nix/store/nk4px4bjp0kiss27n5dyrwsj9xgflwhp-nix-2.3/bin/nix-build -I $'nixpkgs=/nix/store/r62cm88d018fnjl35qd8k8d5bz6cyvpa-source' -I $'nixpkgs-overlays=/tmp/overlays56245-1.nix' -E $'(import <nixpkgs/nixos> { configuration = import ./configuration.nix; }).system' --no-out-link --show-trace
Tip: Press Ctrl+e to display full output
/nix/store/psykyl2giymfdd52yq58k8s78s4jab55-nixos-system-nixos-23.05pre-git
✔ Testing configuration

# Triple-click and paste

$ /nix/store/nk4px4bjp0kiss27n5dyrwsj9xgflwhp-nix-2.3/bin/nix-build -I $'nixpkgs=/nix/store/r62cm88d018fnjl35qd8k8d5bz6cyvpa-source' -I $'nixpkgs-overlays=/tmp/overlays56245-1.nix' -E $'(import <nixpkgs/nixos> { configuration = import ./configuration.nix; }).system' --no-out-link --show-trace  
/nix/store/psykyl2giymfdd52yq58k8s78s4jab55-nixos-system-nixos-23.05pre-git

Merge criteria

(Please make a note here of any dependencies on other open merge requests, or any other blockers that must be dealt with before anyone should hit the "Merge" button. Delete this comment if there are none.)

  • All merge requests must be reviewed by someone other than the original author.
  • Before hitting the "Merge" button, verify that the associated CI build has succeeded or that the source branch can be built with a manual nix-build.

Checklist for success

  • I have updated the changelog.
  • I have updated the README for any non-trivial changes.
  • My code is consistent with the Obsidian style guide.

Merge request reports