auto-commit icon indicating copy to clipboard operation
auto-commit copied to clipboard

auto-commit does not auto-install

Open 0x4007 opened this issue 2 years ago • 5 comments

m1:auto-commit nv$ curl -fsSL https://raw.githubusercontent.com/m1guelpf/auto-commit/main/install.sh | sh -
https://github.com/m1guelpf/auto-commit/releases/latest/download/auto-commit-darwin-aarch64
downloading latest binary
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 5023k  100 5023k    0     0  1009k      0  0:00:04  0:00:04 --:--:-- 1147k
installed - Auto Commit 0.1.5
m1:auto-commit nv$ auto-commit --help
-bash: auto-commit: command not found
m1:auto-commit nv$

0x4007 avatar Nov 01 '22 07:11 0x4007

I realize the issue is because I am using ~/.profile instead of ~/.bashrc

I would recommend at least putting a note in the README, or at most automatically detecting which config file is being used.

0x4007 avatar Nov 01 '22 08:11 0x4007

We're trying to do both! See the note about restarting your terminal in the README, and the install script. Any ideas to improve are welcome :D

m1guelpf avatar Nov 01 '22 13:11 m1guelpf

It's not about restarting the terminal. From what I understand, if ~/.profile exists on macOS, then it will not load ~/.bashrc unless you explicitly tell it to e.g. source ~/.bashrc

The current installation process will only append the necessary config in ~/.bashrc

Because macOS loads several configs in a certain order, it could be useful to detect that to smooth the installation process!

0x4007 avatar Nov 01 '22 22:11 0x4007

Hi @pavlovcik, what is the workaround for someone using ~/.bashrc ?

Benmuiruri avatar Nov 21 '22 14:11 Benmuiruri

  • source ~/.bashrc in ~/.profile
  • To clarify, I moved everything into ~/.bashrc and now my ~/.profile in its entirety appears as follows:
#!/bin/bash/env bash
source ~/.bashrc

0x4007 avatar Nov 22 '22 06:11 0x4007