Skip to content

Commit

Permalink
When call include bash add enviroment variable RUST_BACKTRACE=0 to sk…
Browse files Browse the repository at this point in the history
…ip error in geticons
  • Loading branch information
bigbruno committed May 15, 2024
1 parent 82f336e commit e5fd454
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bigbashview/usr/lib/bbv/server/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def include_html(self, html_content, file_path, original_string):
# Include a bash script
def include_bash(self, html_content, script, original_string):
try:
result = subprocess.check_output(['bash', '-c', script], stderr=subprocess.STDOUT)
result = subprocess.check_output(['bash', '-c', script], stderr=subprocess.STDOUT, env={**os.environ, 'RUST_BACKTRACE': '0'})
html_content = html_content.replace(original_string, result.decode())
except subprocess.CalledProcessError as e:
html_content = html_content.replace(original_string, f"Error executing bash script: {e.output.decode()}")
Expand Down

0 comments on commit e5fd454

Please sign in to comment.