Commits

Anonymous committed b890e7d

fix: auto elevate for instdeb.

  • Participants
  • Parent commits 1940572

Comments (0)

Files changed (2)

 from optparse import OptionParser, BadOptionError, AmbiguousOptionError
 
 # initialization
-__version__ = '1.06'
-use_sudo = ('apt-get', 'apt-get remove', 'aptitude', 'apt-key', 'dpkg -i',
-            'add-apt-repository ', 'apt-get install')
+__version__ = '1.07'
+use_sudo = ('apt-get', 'apt-get remove', 'aptitude', 'apt-key',
+            'dpkg --install', 'add-apt-repository ', 'apt-get install')
 
 # map commands to their appropriate binaries:
 cmd_map = {
 
 
 # should this be elevated?
+prefix = ''
 if binary in use_sudo and os.geteuid() != 0:
     prefix = 'sudo '
-else:
-    prefix = ''
+
 
 # check if binary uses a flag instead of command
 if ' ' in binary:
 Release Notes
 ~~~~~~~~~~~~~~~
 
-- 1.05 - Add ls and dir aliases and doc syntax.
+- 1.07 - Fix auto elevate for instdeb.
+- 1.06 - Add ls and dir aliases and doc syntax.
 - 1.05 - Doc improvements.
 - 1.04 - Allow additional options to be passed thru w/o error.
 - 1.03 - Update readme with release notes and document new aliases.