
import os.path

EXTRA_SCRIPTS_DIR = '/tmp/extra-scripts'

def installerRunning():
    return os.path.isdir(EXTRA_SCRIPTS_DIR)


import os

EXTRA_SCRIPTS_DIR = '/mnt'

def installerRunning():
    return os.environ.get('XS_INSTALLATION', '0') != '0'

Use env variable to indicate installer
Use env variable to indicate installer

  
- import os.path
+ import os
  
- EXTRA_SCRIPTS_DIR = '/tmp/extra-scripts'
+ EXTRA_SCRIPTS_DIR = '/mnt'
  
  def installerRunning():
-     return os.path.isdir(EXTRA_SCRIPTS_DIR)
+     return os.environ.get('XS_INSTALLATION', '0') != '0'
  
Use env variable to indicate installer
## Code Before:

import os.path

EXTRA_SCRIPTS_DIR = '/tmp/extra-scripts'

def installerRunning():
    return os.path.isdir(EXTRA_SCRIPTS_DIR)

## Instruction:
Use env variable to indicate installer
## Code After:

import os

EXTRA_SCRIPTS_DIR = '/mnt'

def installerRunning():
    return os.environ.get('XS_INSTALLATION', '0') != '0'
