def exec_output()

in solutions_builder/copier_extensions/sb_helpers.py [0:0]


def exec_output(command, working_dir=".", stop_when_error=False):
  try:
    output = subprocess.check_output(command,
                                     stderr=subprocess.STDOUT,
                                     cwd=working_dir,
                                     shell=True,
                                     text=True)
  except subprocess.CalledProcessError as e:
    # print("Status : FAIL", e.returncode, e.output)
    raise e

  else:
    return output