Skip to content

Commit

Permalink
Add flag to enable backslash escapes
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSazonov committed Jul 19, 2024
1 parent 312b32a commit 52c2330
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
--compiler ${{ matrix.toolchain.exe }}
--mode debug
--bash-syntax
--enable-backslash-escapes
- name: Print some build-specific variables
shell: bash
Expand Down
14 changes: 7 additions & 7 deletions scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
global ARGS
global CONFIG

MSG_COLOR = r'\033[0;32m' #'\\033[0;32m' # green
HEAD_COLOR = '\\033[1;34m' # bold blue
COLOR_OFF = r'\033[0m' #'\\033[0m'
MSG_COLOR = r'\033[0;32m' # green
HEAD_COLOR = r'\033[1;34m' # bold blue
COLOR_OFF = r'\033[0m'


def _github_actions():
Expand Down Expand Up @@ -47,7 +47,7 @@ def _main_script_path():

def _echo_cmd():
if _enable_backslash_escapes():
return 'echo' #'echo -e'
return 'echo -e'
return 'echo'

def _echo_msg(msg: str):
Expand Down Expand Up @@ -126,9 +126,9 @@ def _write_lines_to_file(lines: list, name: str):
with open(path, 'w') as file:
for line in lines:
if _bash_syntax():
pass
#line = line.replace('\\', '/') # change path separators
#line = line.replace('/033', r'\\033') # fix colors
#pass
line = line.replace('\\', '/') # change path separators
line = line.replace('/033', r'\033') # fix colors
file.write(line + '\n')
_fix_file_permissions(path)

Expand Down

0 comments on commit 52c2330

Please sign in to comment.