Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotman seems unable to execute the add_env function properly #25

Open
dulhaver opened this issue Nov 20, 2023 · 1 comment
Open

dotman seems unable to execute the add_env function properly #25

dulhaver opened this issue Nov 20, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@dulhaver
Copy link

dulhaver commented Nov 20, 2023

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 and DOT_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:

  1. sh -c "$(curl -fsSL https://raw.githubusercontent.com/Bhupesh-v/dotman/master/tools/install.sh)"
  2. cd ~/dotman && mkdir ~/.dotfiles && ./dotman.sh
  3. source ~/.bashrc
  4. ./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 : 
@dulhaver dulhaver added the bug Something isn't working label Nov 20, 2023
@dulhaver
Copy link
Author

dulhaver commented Dec 3, 2023

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" ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant