1 USING: accessors arrays assocs combinators command-line
2 environment formatting fry io.launcher kernel locals math
3 namespaces sequences splitting strings system ui vocabs
8 ERROR: elevated-failed command { strategies array } ;
9 ERROR: lowered-failed ;
11 GENERIC#: prepend-command 1 ( command word -- word+command )
12 M: array prepend-command
15 M: string prepend-command
18 GENERIC: failed-process? ( process -- ? )
19 M: f failed-process? not ;
20 M: fixnum failed-process? -1 = ;
21 M: process failed-process? status>> zero? not ;
24 HOOK: already-root? os ( -- ? )
26 HOOK: elevated os ( command replace? win-console? posix-graphical? -- process )
27 HOOK: lowered os ( -- )
29 : elevate ( win-console? posix-graphical? -- ) [ (command-line) t ] 2dip elevated drop ;
31 USE-UNIX: elevate.unix
32 USE-WINDOWS: elevate.windows
33 USE-LINUX: elevate.linux
34 USE-MACOSX: elevate.macosx