Coder Social home page Coder Social logo

Comments (4)

timsutton avatar timsutton commented on June 6, 2024

I don't think it really matter practically whether something's copied or a symlink because it's being done for every version, so this seems fine.

However, on my machine, TextMate doesn't complain if the file is a symlink. Are you sure it's not complaining for some other reason? In other words, does it say that's why it's asking for admin rights, and does it copy the file (overwriting the symlink) if you enter an admin password?

FWIW, I've tested on my machine that the symlink can be either owned by my regular user or root:wheel. TextMate's preferences report that shell support is installed.

from recipes.

jps3 avatar jps3 commented on June 6, 2024

I had been preparing a detailed list of the steps I took, but thought I'd better retrace my steps from earlier today... And either something is behaving slightly differently, or I did something slightly different earlier. I would swear that earlier I had tested as non-admin user with symlink and as copy, and did not got prompt for admin creds with symlink of 'mate', but did not get prompt with copy of 'mate' in /usr/local/bin... Just tested on a different lab machine as non-admin and now, either way I get prompt for admin creds on first launch and I cannot yet figure out what TextMate is trying to do that it's asking for this.

Sorry for bother! If I figure this out, can add comment here if you like (I know not same issue technically, but perhaps helpful?)

from recipes.

jps3 avatar jps3 commented on June 6, 2024

Before I forget, this is dealing with TextMate 2.0-alpha.9487

Here are some ARD screenshots of the remote/lab computer of steps I was taking:

autopkg-github-textmate2-001

  • Before logging in had done rm -fr for non-admin user home folder I'd tested with, and recreated (createhomedir -c -u ), as well as /Applications/TextMate.app and /usr/local/bin/mate. I did this to try to start with a clean slate.
  • I then ran Munki's managedsoftwareupdate which installed TextMate2. In this instance was my version of postinstall script which made copy of 'mate' rather than symlink (you can see it in the Finder window to the left).

autopkg-github-textmate2-003

  • I was curious if there was any diagnostic output, so I ran the TextMate binary directly from the command line. The prompt for admin credentials had popped up and I had hit Esc or clicked cancel.
  • What had made me think that 'cp' was required over symlink was the output you'll see at the bottom of the Terminal window, the line '/bin/cp -p ...' and what led to my original posting.

autopkg-github-textmate2-004

  • After quitting TextMate.app, which in Terminal returned me to a command prompt.
  • Out of curiosity, and as a sanity check, did a SHA256 hash check between 'mate' in /Applications/TextMate.app/Contents/Resources and /usr/local/bin. They're the same.

Note: I just repeated the first step after deleting /Users/ folder and createhomdir again, and erasing TextMate.app and 'mate' and reinstalling via Munki. This time I used stock autopkg recipe which created symlink. When prompted for admin credentials I did enter them (as opposed to prior Esc/Cancel) and symlink in /usr/local/bin was replaced with 'cp' copy of 'mate'! (Hrmm...)

from recipes.

timsutton avatar timsutton commented on June 6, 2024

Sorry for the delay in dealing with this one. I was never able to get it to request auth due to the symlink, but just for reference here's what TextMate does currently to install the binary:

https://github.com/textmate/textmate/blob/274f73b7de3e7fd9ed67490cfc82cf6d22f9c44e/Frameworks/Preferences/src/TerminalPreferences.mm#L113-L140

Thanks for investigating!

from recipes.

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.