Skip to content

Commit

Permalink
Add WSL2 support to open
Browse files Browse the repository at this point in the history
  • Loading branch information
gocom committed Oct 25, 2024
1 parent 55340b1 commit 676dd84
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

DOTFILES_UID ?= "$$(id -u)"
DOTFILES_GID ?= "$$(id -g)"
RUN = docker-compose run -u "$(DOTFILES_UID):$(DOTFILES_GID)" --rm build
RUN = docker compose run -u "$(DOTFILES_UID):$(DOTFILES_GID)" --rm build

all: test

Expand Down
5 changes: 5 additions & 0 deletions bin/open
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ main () {
exit "$?"
fi

if [ "$(command -v explorer.exe)" ]; then
explorer.exe "$(wslpath -aw "$@")"
exit 0
fi

if ! [[ "${OSTYPE:-}" =~ "darwin" ]] && [ "$(command -v gio)" ]; then
exec gio open "$@"
exit "$?"
Expand Down

0 comments on commit 676dd84

Please sign in to comment.