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

Terminal doesn't display commits/Problems with git-standup #14

Closed
DanielAndreasen opened this issue Apr 18, 2017 · 38 comments
Closed

Terminal doesn't display commits/Problems with git-standup #14

DanielAndreasen opened this issue Apr 18, 2017 · 38 comments

Comments

@DanielAndreasen
Copy link

Hi there, and thanks for this cool tool! 😄
I have set up everything, but I'm unable to see the git stuff. The problem for me is that standup-helper.sh is looking for git-standup in a place where it is not located.
I installed git-standup with sudo npm install -g git-standup (maybe I should do this in another way).
Any suggestions?

I also have problems with the fonts/emojis, but I can open another issue if you would like.

@Someguy123
Copy link

Sadly I can't seem to get the GIT working either. I installed it via NPM, node version v6.3.1.

@DanielAndreasen
Copy link
Author

DanielAndreasen commented Apr 18, 2017

I manage to get npm to install git-standup in the ~/node_modules folder*. If I run: ./standup-helper.sh /path/to/git/repos it works perfectly fine. If I run with sh standup-helper.sh ... it doesn't not work (this is how I think the JS is working).

* Uninstall npm, and install nvm instead. Use this to install node and npm can be used again. Now it can be used without sudo.

@notwaldorf
Copy link
Owner

notwaldorf commented Apr 18, 2017

Ugh, yeah, I don't really speak good node so I don't know how to get the path to git-standup from every kind of install. This is also why this doesn't work with yarn 😿

There's a PR out (#8) that I want to try to see if it fixes this, but since it still reaches into node_modules in the same way, it's probably going to solve a different problem, but not this one.

Any ideas welcome.

@DanielAndreasen
Copy link
Author

Can't you just assume git-standup is in the PATH? Then you don't have to do this path trick.

@shelldandy
Copy link

Im having the same troubles maybe because I use fish-shell and I think the script assumes bash, so it is far easier just to assume git-standup is in the path and throw a message if it isn't

@DanielAndreasen
Copy link
Author

@Mike3run I tried running this in a bash shell, but with the same results. Hopefully PR #18 will resolve this.

@shelldandy
Copy link

@DanielAndreasen the author said yesterday she uses zsh with oh-my-zsh so yeah im guessing this only works now if you have your shell just like that 😝

@DanielAndreasen
Copy link
Author

@Mike3run I also use zsh, although not oh-my-zsh anymore. So that alone will not do the trick 😢

@notwaldorf
Copy link
Owner

notwaldorf commented Apr 19, 2017

I think this is about how your npm is installed, not about the shell you use -- for example, if you yarn install this, it doesn't work either.

Trying to look at the open PRs that fix this, but they don't work on my system yet :(

@shelldandy
Copy link

🤔 that could be, I have installed npm with nvm

And i think a great number of devs do that as well, do you have installed with homebrew @notwaldorf ?

@notwaldorf
Copy link
Owner

I have it installed with nvm and it works.

Hold on y'all, I've asked @zkat for help and I'll see what her fix is :)

@notwaldorf
Copy link
Owner

notwaldorf commented Apr 19, 2017

OK! I published 1.0.5 that maybe works better (edit: especially if you do npm install -g git-standup)? Anyone with a brokentiny-care-terminal` want to install that and tell me if it's better, pretty please? 🙏

@zkat
Copy link

zkat commented Apr 20, 2017

Yeah there's not much to do here. There's an npm-exec thing we've been meaning to write for a while that would (hopefully, probably) allow all the path stuff to be configured the way npm scripts set up, but can't really just do it for bash scripts like this without going through npm run-script.

@DanielAndreasen
Copy link
Author

@notwaldorf I have upgraded to version 1.0.7 and still doesn't work! But wait, when I run sh standup-helper.sh /some/path I get an error. However, if I run bash standup-helper.sh /some/path everything works fine. So I simple changed line 105 and 113 in care.js to use bash instead and all works! 😀

The error I get is:

standup-helper.sh: 11: standup-helper.sh: Syntax error: "(" unexpected

If I remove the usage function the problem is also solved. As the error says, I think you just use slightly wrong syntax error for sh, but for bash it is fine.

@jackmransom
Copy link
Contributor

@DanielAndreasen There hasn't been a version bump yet, but @notwaldorf has merged my PR that fixes this syntax error. So the script (as it exists in the repo, at least) should now work with sh too! 😃

@notwaldorf
Copy link
Owner

notwaldorf commented Apr 20, 2017 via email

@DanielAndreasen
Copy link
Author

@jackmransom Ahh I see. Cool! :)
@notwaldorf G'morning. Looking forward to the new version :)

@notwaldorf notwaldorf changed the title Problems with git-standup Terminal doesn't display commits/Problems with git-standup Apr 20, 2017
@notwaldorf
Copy link
Owner

notwaldorf commented Apr 20, 2017

@jackmransom @DanielAndreasen 1.0.8 tagged! Let me know if it fixes your problems!

@DanielAndreasen
Copy link
Author

DanielAndreasen commented Apr 20, 2017

It works perfectly 👍 At least for me. Only thing that is needed is a depth parameter for the git-standup, but I think this is already under development.
Thank you very much 😃

@darxtrix
Copy link

For me not fixed 😞

@Garbee
Copy link
Contributor

Garbee commented Apr 20, 2017

I use fish for my shell and it has worked fine here from initial install. I added instructions to the readme on setting the environment variables properly for the program to pick them up. So make sure they are being set right (you can confirm by running node and check the process.env output) and try the software again.

If anyone is still having problems with fish specifically, if you could open up an issue about what specifically isn't working focused on fish and mention me I'll take a look. I'd rather try and keep the shell-specific debugging separated from individual issues affecting everyone if @notwaldorf doesn't mind that.

@cfjedimaster
Copy link

I'm seeing this myself with Windows Bash. When I update tiny-care-terminal, I get the following issue:

npm WARN deprecated [email protected]: v1 is no longer maintained, please upgrade to v2.0+ as soon possible.
npm WARN deprecated [email protected]: use cross-spawn or [cross-spawn-async](https://gi
thub.com/IndigoUnited/node-cross-spawn-async) instead.
npm WARN deprecated [email protected]: Use uuid module instead
/usr/bin/tiny-care-terminal -> /usr/lib/node_modules/tiny-care-terminal/care.js
/usr/lib
├── UNMET PEER DEPENDENCY git-standup@^2.1.8
└── [email protected]

I can install git-standup by itself though w/o error. I just uninstalled/reinstalled to be sure I had the latest, but yep, no git commits. Is there a way for me to debug to provide more information?

@Garbee
Copy link
Contributor

Garbee commented Apr 22, 2017

git-standup is a peer dep so that needs to be installed by users as shown in the README (although the order is reversed so you're seeing the error.) The other warnings can be safely ignored, they're just warnings about some oudated/unmaintained software in use but that isn't affecting the usability.

Is your Windows Bash the "Ubuntu Bash On Windows" thing in Windows 10 or the git bash software distributed with git?

@cfjedimaster
Copy link

It's the Ubuntu Bash on Windows thing.

@jackmransom
Copy link
Contributor

@cfjedimaster Silly question, I know, but do you have git installed in your Bash on Windows environment? git-standup will quite happily install without it but it'll fail at runtime.

If so, the output from running standup-helper.sh directly from a terminal would be helpful.

@cfjedimaster
Copy link

Yep, git works, and (since I didn't know what git-standup even did), I found it added 'standup' as an argument to Git, which I confirmed worked too.

Where would I find standup-helper.sh?

@jackmransom
Copy link
Contributor

@cfjedimaster If you run npm list -g tiny-care-terminal it should give you the directory containing standup-helper.sh

@cfjedimaster
Copy link

Ok, I found it... but oddly I can't run it. I installed tiny-care-helper via sudo, so I tried to sudo ./standup-helper.sh from the directory, and it still can't find it.

@jackmransom
Copy link
Contributor

@cfjedimaster How about running it as sh standup-helper.sh?

@cfjedimaster
Copy link

That works -I also changed it to a+x (which I realize is overkill), running it provides no output.

@cfjedimaster
Copy link

Ok, I figured out it takes a path as an arg. I ran:

sh standup-helper.sh /mnt/c/projects/raymondcamdendotcom

And it output:

Seems like Raymond Camden did nothing!

@jackmransom
Copy link
Contributor

@cfjedimaster What about if you specify -d 7 as an arg?

@cfjedimaster
Copy link

It correctly reports my last set of commits.

@curieos
Copy link

curieos commented Apr 24, 2017

I was able to get it to work if I changed care.js a little bit. I looked at the output of console.log(today); and saw that the spawnargs section had '/bin/sh', '-c', and 'sh /path/to/standup-helper.sh', missing the $TTC_REPOS paths

I changed the today line to:
var today = spawn('sh ' + __dirname + '/standup-helper.sh ' + config.repos, [config.repos], {shell:true});
and the week line to a similar thing and it now works. It seems like the spawn function(?) isnt being called correctly? I'm not super familiar with js so I'm not 100% sure what is going on.

@Garbee
Copy link
Contributor

Garbee commented Apr 24, 2017

That is JS calling a shell script. It works in some cases like that but not in others so the PR to make that spawn change was closed. PR #18 will probably handle these issues. So test it out please and see if it helps with your environments.

@notwaldorf
Copy link
Owner

As of version 1.2.0 there's a new way to use the terminal that doesn't involve the bash script, and should fix these probelms. To use that, set the TTC_GITBOT environment variable to gitlog. This will become the default way in the future, I'm just giving it a bit of time in the wild before switching to it

@cfjedimaster
Copy link

It works - thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

11 participants