Skip to content
This repository has been archived by the owner on Sep 23, 2021. It is now read-only.

Prompt shows but name and icon are not visible on macOS #127

Closed
davidhemphill opened this issue Jun 25, 2020 · 8 comments
Closed

Prompt shows but name and icon are not visible on macOS #127

davidhemphill opened this issue Jun 25, 2020 · 8 comments

Comments

@davidhemphill
Copy link

davidhemphill commented Jun 25, 2020

sudo-prompt is not correctly showing the name or icon file for the app when passed an object with name or icns keys. I was able to replicate the issue on a fresh Electron project with just this package installed. The following code:

import sudo from 'sudo-prompt'

let options = {
  name: 'Valet Lite',
  icns: '/Applications/Valet Lite.app/Contents/Resources/Valet Lite.icns',
}

sudo.exec('ls', options, (error, stdout, stderr) => {
  if (error) throw error
  console.log(stdout)
  console.log(stderr)
})

Produces this:

image

@davidhemphill davidhemphill changed the title Prompt shows but name and icon are not visible on Macos Prompt shows but name and icon are not visible on macOS Jun 25, 2020
@davidhemphill
Copy link
Author

I downloaded the repository and ran node test.js and the errant behavior was present as well. This is on Catalina 10.15.5.

@jorangreef
Copy link
Owner

Thanks @davidhemphill I can confirm this. Do you know of any changes in Info.plist behavior across macOS that would affect this? That's what we're using to set the app name and icon.

@davidhemphill
Copy link
Author

Sadly, I don't as that's out of my area of expertise. I'll do some research on my end and see if I can come up with anything.

@idanwork
Copy link

idanwork commented Jul 7, 2020

Hi I have the same issue after updated to Catalina 10.15.5,

The same product works as expected on older versions of macOS and older versions of Catalina (10.15.4 and older).

I didn't have the chance to check what is causing, I'll try to make some time for checking this.

@idanwork
Copy link

Hi Guys,

I'm sorry to say that I wasn't able to figure it out yet.
I tried to recreate the applet using Catalina Xcode 11.

It didn't change anything, Icon and name are missing.

I'll try next following the suggested path under this issue
#109

Seems Catalina will require new approach for running elevated commands.

@idanwork
Copy link

Sorry for spamming,
Just got word that on 10.15.6 it was fixed ;)
So it was indeed an apple issue

@kotapeter
Copy link

kotapeter commented Jul 27, 2020

@idanwork Thank you! I can also confirm it, I've just updated MacOS to 10.15.6 and sudo-prompt works as expected :) This issue can be closed.

@jorangreef
Copy link
Owner

Thanks everyone!

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

No branches or pull requests

4 participants