Sublime Forum

Sudo fails

#1

sudo subl /etc/hosts 2011-03-03 10:11:01.977 subl[11362:e07] *** Assertion failure in -[NSWorkspace launchApplicationAtURL:options:configuration:error:], /SourceCache/AppKit/AppKit-1038.35/AppKit.subproj/NSWorkspace.m:1018 2011-03-03 10:11:01.980 subl[11362:e07] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: url != nil' *** Call stack at first throw: ( 0 CoreFoundation 0x995f46ba __raiseError + 410 1 libobjc.A.dylib 0x900b8509 objc_exception_throw + 56 2 CoreFoundation 0x995f43e8 +[NSException raise:format:arguments:] + 136 3 Foundation 0x98062bb3 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 116 4 AppKit 0x916a164a -[NSWorkspace launchApplicationAtURL:options:configuration:error:] + 152 5 subl 0x00003478 main + 840 6 subl 0x00003109 start + 53 ) Trace/BPT trap

0 Likes

#2

This should now just not-work, rather than crash, in 2038.

Running subl with sudo isn’t going to work, because all subl does is send the filename off to the real Sublime Text 2 application. This isn’t ideal, but there doesn’t seem to be an easy way around it.

0 Likes

#3

any chance sublime will ask for administrative privileges when editing files, that needs to be sudo’d

0 Likes

#4

Yeah, this is something that gets me all the time. With TextMate, you could do:

mate /etc/hosts

Then edit away, then hit save and it would ask you for your password to do the save. It’s one of the few remaining occasions where I resort to going back to TextMate, after the obligatory:

Memory lapse -> subl /etc/hosts -> Save -> DOH! -> mate /etc/hosts -> Edit -> Save -> Enter Password -> Done

0 Likes

#5

do we have a user echo entry for this yet?

0 Likes

#6

+1 for this feature. I also still use textmate for these situations

0 Likes

#7

[quote=“buymeasoda”]

Yeah, this is something that gets me all the time. With TextMate, you could do:

mate /etc/hosts

Then edit away, then hit save and it would ask you for your password to do the save. It’s one of the few remaining occasions where I resort to going back to TextMate, after the obligatory:

Memory lapse -> subl /etc/hosts -> Save -> DOH! -> mate /etc/hosts -> Edit -> Save -> Enter Password -> Done[/quote]

This happens at least a half-dozen times a day for me.

0 Likes