Bug 416625 - kdesrc-build adds entries in ~/.bashrc when zsh is in use
Summary: kdesrc-build adds entries in ~/.bashrc when zsh is in use
Status: RESOLVED FIXED
Alias: None
Product: kdesrc-build
Classification: Developer tools
Component: setup wizard (other bugs)
Version First Reported In: Git
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Michael Pyne
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-22 20:59 UTC by pseudoroot
Modified: 2020-01-26 06:32 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pseudoroot 2020-01-22 20:59:55 UTC
SUMMARY
When we run kdesrc-build --initial-setup then PATH and alias entries are made in ~/.bashrc file even if another shell is in use (Eg: zsh).

This issue can be resolved by detecting shell at runtime, then using appropriate file. Example: for /usr/bin/bash :- use .bashrc, /usr/bin/zsh :- use .zshrc


STEPS TO REPRODUCE
1. $echo $SHELL; gives output /usr/bin/zsh
2. Run kdesrc-build --initial-setup
3. Complete package install wizard - In the end message is displayed - "Amending your ~/.bashrc to also point to install dir" "Amending your ~/.bashrc to add kdesrc-run alias..." "Your ~/.bashrc has been successfully setup"


OBSERVED RESULT
~/.bashrc file is modifies

EXPECTED RESULT
~/.zshrc file should have been modified.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version: 5.17.5

ADDITIONAL INFORMATION

If possible, I'd like to have a look at this issue please :) I have a POC. Please let me know how I can get it reviewed.

P.S: This is my first bug report. Apologies if I missed something (Do let me know so I can take care next time).

Thank you
Comment 1 kogiokkafrms 2020-01-26 06:32:31 UTC
The fix has been merged into master branch of kdesrc-build. See commit: https://phabricator.kde.org/R365:011e21c7abcdb277a7cb1b65315116f7ed46d242