GithubHelp home page GithubHelp logo

Permissions error on startup about mcfly HOT 10 CLOSED

cantino avatar cantino commented on August 11, 2024
Permissions error on startup

from mcfly.

Comments (10)

cantino avatar cantino commented on August 11, 2024

Weird! Thanks for testing out McFly. I'm still on 10.13.6. Do both terminal windows have the same value for $MCFLY_HISTORY? Does running mktemp -t mcfly.XXXX twice give you the same output? (It shouldn't.)

from mcfly.

gwk avatar gwk commented on August 11, 2024

Every time I open a window it creates a new mcfly.XXXX, which matches the set $MCFLY_HISTORY. If I run the mktemp command above twice I get different paths.

Last login: Mon Dec  3 19:15:05 on ttys011
-bash: /var/folders/kb/bswbcrr56ld5cv7zzhyp57gr0000gn/T/mcfly.XXXX.SNQglCSU: cannot overwrite existing file
gwk ~ $ echo $MCFLY_HISTORY
/var/folders/kb/bswbcrr56ld5cv7zzhyp57gr0000gn/T/mcfly.XXXX.SNQglCSU
gwk ~ $ 

from mcfly.

cantino avatar cantino commented on August 11, 2024

That's very odd. If you edit mcfly.bash and add after line 9:

chmod 644 $MCFLY_HISTORY

Does that help at all? I can't tell if mcfly.bash is erring out on line 8 or if it's later.

from mcfly.

gwk avatar gwk commented on August 11, 2024

I added set -x, and it looks like it's the tail command on line 15.

+++ [[ '' == \l\o\a\d\e\d ]]
+++ export __MCFLY_LOADED=loaded
+++ __MCFLY_LOADED=loaded
++++ cat /dev/urandom
++++ env LC_CTYPE=C tr -dc a-zA-Z0-9
++++ fold -w 24
++++ head -n 1
+++ export MCFLY_SESSION_ID=R6GaHe2Jn5JzbylIKmM1JEu3
+++ MCFLY_SESSION_ID=R6GaHe2Jn5JzbylIKmM1JEu3
++++ mktemp -t mcfly.XXXX
+++ export MCFLY_HISTORY=/var/folders/kb/bswbcrr56ld5cv7zzhyp57gr0000gn/T/mcfly.XXXX.JsVKq6ZD
+++ MCFLY_HISTORY=/var/folders/kb/bswbcrr56ld5cv7zzhyp57gr0000gn/T/mcfly.XXXX.JsVKq6ZD
+++ export HISTFILE=/Users/gwk/.bash_history
+++ HISTFILE=/Users/gwk/.bash_history
+++ [[ -f /Users/gwk/.bash_history ]]
+++ tail -n100 /Users/gwk/.bash_history
-bash: /var/folders/kb/bswbcrr56ld5cv7zzhyp57gr0000gn/T/mcfly.XXXX.JsVKq6ZD: cannot overwrite existing file
+++ export HISTCONTROL=ignorespace
+++ HISTCONTROL=ignorespace
+++ shopt -s histappend
+++ PROMPT_COMMAND='__last_exit=$?;history -a $MCFLY_HISTORY;mcfly add --exit $__last_exit --append-to-histfile;history -cr $MCFLY_HISTORY;gloss_set_prompts'
+++ [[ himxBCH =~ .*i.* ]]
+++ bind ''\''\C-r'\'': '\''\C-amcfly: \e# mcfly search\C-j'\'''
+++ set +x

from mcfly.

cantino avatar cantino commented on August 11, 2024

That's helpful! Does adding chmod 644 $MCFLY_HISTORY after line 9 help?

from mcfly.

gwk avatar gwk commented on August 11, 2024

I know what is wrong: I have bash configured to deny blind overwrites with >. I changed it to use >| instead and it works. I forget what this option is called, but I can look it up.

from mcfly.

cantino avatar cantino commented on August 11, 2024

Oh interesting, I didn't know about noclobber! Mind sending a PR with the change? (Or I can add it, but I want you to get credit! 😄 )

from mcfly.

gwk avatar gwk commented on August 11, 2024

It's set -o noclobber. Seems worth supporting since you are sourcing into the user's interactive shell.

from mcfly.

gwk avatar gwk commented on August 11, 2024

Yes, I'll make a PR now.

from mcfly.

cantino avatar cantino commented on August 11, 2024

I believe that this has been fixed.

from mcfly.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.