dotman
dotman copied to clipboard
dotman seems unable to execute the add_env function properly
Describe the bug
running dotman the second time I end up in the initial
setup again.
- I found out that apparently the
add_env
function is not being executed as it should. - I guess the variables
DOT_REPO
andDOT_DEST
are somehow known via some declaration within the script and therefore the check[[ "$DOT_DEST" && "$DOT_REPO" ]] && return
in line 89 never fails and likewise the rest of the function (with adding those to~/.bashrc
never runs. I could not solve this though
expected behavior dotman would recognize that it ran alreay and therefore throw me into the regular interface, not the initial setup again and again
To Reproduce Steps to reproduce the behavior:
-
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Bhupesh-v/dotman/master/tools/install.sh)"
-
cd ~/dotman && mkdir ~/.dotfiles && ./dotman.sh
-
source ~/.bashrc
-
./dotman.sh
Expected behavior A clear and concise description of what you expected to happen.
Desktop (please complete the following information):
- manjaro,bash:
5.2.15(1)-release
- ubuntu 22.04, bash:
5.1.16(1)-release
Additional context
I tested this on my local manjaro
. As I failed constantly with trying many things to troubleshout and also because am running oh-my-bash
there i did another test inside a fresh ubuntutu 22.04 lxc container. Here is what I got there (same behavior).
07:28:22 manolo@manj-laptop dotman Β±|dulhaver_bugfixing β|β lxc exec ubn2204-dotman -- sh -c "$(curl -fsSL https://raw.githubusercontent.com/Bhupesh-v/dotman/master/tools/install.sh)"
Cloning into 'dotman'...
remote: Enumerating objects: 347, done.
remote: Counting objects: 100% (125/125), done.
remote: Compressing objects: 100% (45/45), done.
remote: Total 347 (delta 70), reused 117 (delta 66), pack-reused 222
Receiving objects: 100% (347/347), 142.44 KiB | 1.56 MiB/s, done.
Resolving deltas: 100% (196/196), done.
[βοΈ ] Successfully cloned dβtman
fatal: '5e0613c3ed47948f63f60461abfc05744237e8b3 refs/tags/v0.3.0' is not a commit and a branch 'master' cannot be created from it
Couldn't set alias for dotman: /root/dotman/dotman.sh
Consider adding it manually.
07:28:58 manolo@manj-laptop dotman Β±|dulhaver_bugfixing β|β lxc exec ubn2204-dotman -- bash
root@ubn2204-dotman:~# cd dotman
root@ubn2204-dotman:~/dotman# ls
CHANGELOG.md CODE_OF_CONDUCT.md CONTRIBUTING.md LICENSE README.md assets dotman.sh tools
root@ubn2204-dotman:~/dotman# mkdir ~/.dotfiles && ./dotman.sh
Hi π
_ _
| | | |
__| | ___ | |_ _ __ ___ __ _ _ __
/ _` |/ _ \| __| `_ ' _ \ / _' | '_ \
| (_| | (_) | |_| | | | | | (_| | | | |
\__,_|\___/ \__|_| |_| |_|\__,_|_| |_|
First time use π₯, Set Up dotman
....................................
β€ Enter dotfiles repository URL : https://gitlab.com/dulhaver_devops/dotfiles.git
β€ Where should I clone dotfiles.git (/root/..): .dotfiles
Calling π Git ...
Cloning into 'dotfiles'...
Username for 'https://gitlab.com': dulhaver
Password for 'https://[email protected]':
remote: Enumerating objects: 7, done.
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 7 (delta 2), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (7/7), done.
Resolving deltas: 100% (2/2), done.
[βοΈ ] dotman successfully configured
Open a new terminal or source your shell config
Thanks for using dotman π.
root@ubn2204-dotman:~/dotman# source ~/.bashrc
root@ubn2204-dotman:~/dotman# ./dotman.sh
Hi π
_ _
| | | |
__| | ___ | |_ _ __ ___ __ _ _ __
/ _` |/ _ \| __| `_ ' _ \ / _' | '_ \
| (_| | (_) | |_| | | | | | (_| | | | |
\__,_|\___/ \__|_| |_| |_|\__,_|_| |_|
First time use π₯, Set Up dotman
....................................
β€ Enter dotfiles repository URL :
sorry @Bhupesh-V I am very illiterate when it comes to emojis apart from 'thumbs up', 'thumbs down', 'thanks' ... did you want to express "I am looking into it" ?