Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Conversation

@ryoqun
Copy link
Contributor

@ryoqun ryoqun commented May 31, 2021

Problem

$ sudo solana-sys-tuner --user $(whoami)
sudo: solana-sys-tuner: command not found

because

$ type -p solana-sys-tuner
/home/sol/.local/share/solana/install/active_release/bin/solana-sys-tuner
$ sudo bash -c 'echo "$PATH"'
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin

Summary of Changes

$ sudo $(type -p solana-sys-tuner) --user $(whoami) --version
solana-sys-tuner 1.6.7 (src:ebb5fc12; feat:3458834192)

I think the bashism is ok for solana. :)

part of #13443

@ryoqun ryoqun added the v1.7 label May 31, 2021
@ryoqun ryoqun requested a review from t-nelson May 31, 2021 11:02
@t-nelson
Copy link
Contributor

AFAIK which is more portable than type, could we switch to that?

@ryoqun
Copy link
Contributor Author

ryoqun commented May 31, 2021

AFAIK which is more portable than type, could we switch to that?

heh, if we want to pursue the portability, I'd rather like to use command according to shellcheck. Maybe docs need to be less opinionated? ;)

ref: https://github.com/koalaman/shellcheck/wiki/SC2230

$ command -v solana-sys-tuner
/home/sol/.local/share/solana/install/active_release/bin/solana-sys-tuner

t-nelson
t-nelson previously approved these changes May 31, 2021
Copy link
Contributor

@t-nelson t-nelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+, command -v sounds good 🙂

@mergify mergify bot dismissed t-nelson’s stale review May 31, 2021 17:31

Pull request has been modified.

@ryoqun ryoqun added the automerge Merge this Pull Request automatically once CI passes label May 31, 2021
@mergify mergify bot merged commit 4197501 into solana-labs:master May 31, 2021
mergify bot pushed a commit that referenced this pull request May 31, 2021
* Make the sys-tuner oneliner actually copy-pastable

* Use `command -v`

(cherry picked from commit 4197501)
mergify bot added a commit that referenced this pull request May 31, 2021
* Make the sys-tuner oneliner actually copy-pastable

* Use `command -v`

(cherry picked from commit 4197501)

Co-authored-by: Ryo Onodera <[email protected]>
@brooksprumo brooksprumo mentioned this pull request Aug 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

automerge Merge this Pull Request automatically once CI passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants