Skip to content

Commit

Permalink
Merge pull request #10 from linhx/develop
Browse files Browse the repository at this point in the history
Release 1.0.0
  • Loading branch information
linhx authored Jan 8, 2024
2 parents 2068a46 + ea5313e commit 48f30f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions install
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ if [ -f "$FILE_ZSHRC" ]; then
ZSH_SCRIPT_KEYBINDING="$APP_DIR/shell/key-bindings.zsh"
RC_FILE="$DATA_DIR/.zsh"
tee $RC_FILE > /dev/null <<EOT
if [ -f '$BASH_SCRIPT_KEYBINDING' ]; then
. '$BASH_SCRIPT_KEYBINDING'
if [ -f '$ZSH_SCRIPT_KEYBINDING' ]; then
. '$ZSH_SCRIPT_KEYBINDING'
fi
EOT
SOURCE_STR="[ -f $RC_FILE ] && source $RC_FILE"
Expand Down
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ func getAppDir() string {
if err != nil {
panic(fmt.Errorf("Cannot get executable: %w", err))
}
return filepath.Dir(path);
realPath, err := filepath.EvalSymlinks(path)
if err != nil {
panic(fmt.Errorf("Cannot get real path from symlink: %w", err))
}
return filepath.Dir(realPath);
}

func main() {
Expand Down

0 comments on commit 48f30f8

Please sign in to comment.