Skip to content

Commit

Permalink
Fix MacOS Crash because of sed -r option
Browse files Browse the repository at this point in the history
closes #9.
  • Loading branch information
bleeptrack committed Nov 17, 2020
1 parent 803f4f8 commit 04e48a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scenes/file_browser.gd
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func update():

var deleted_files = []
if shell.run("test -d .git && echo yes || echo no") == "yes\n":
deleted_files = Array(shell.run("git status -s | grep '^.D' | sed -r 's/^...//'").split("\n"))
deleted_files = Array(shell.run("git status -s | grep '^.D' | sed 's/^...//'").split("\n"))
deleted_files.pop_back()

var files = wd_files + deleted_files
Expand Down Expand Up @@ -85,7 +85,7 @@ func update():
#var is_visible = false
if repository and repository.there_is_a_git():
var index_files = Array(repository.shell.run("git ls-files -s | cut -f2 | uniq").split("\n"))
var deleted_files = Array(repository.shell.run("git status -s | grep '^D' | sed -r 's/^...//'").split("\n"))
var deleted_files = Array(repository.shell.run("git status -s | grep '^D' | sed 's/^...//'").split("\n"))
# The last entries are empty strings, remove them.
index_files.pop_back()
deleted_files.pop_back()
Expand Down

0 comments on commit 04e48a8

Please sign in to comment.