Skip to content

Commit

Permalink
Fix method effective_path() in shell/myself.
Browse files Browse the repository at this point in the history
  • Loading branch information
Roberto Reale committed Mar 14, 2018
1 parent 78968d1 commit 72a7749
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/shell/myself
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
################################################################################


source bashlets os/path

#@public
function bashlets::shell::myself::name()
{
Expand Down Expand Up @@ -73,14 +75,20 @@ function bashlets::shell::myself::effective_path()
# if $source was a relative symlink, we need to resolve it relative to
# the path where the symlink file was located
[[ $source != /* ]] \
&& source="$(bashlets os path_join "$dir" "$source")"
&& source="$($BASHLETS_NAMESPACE path join "$dir" "$source")"
done

dir="$(cd -P "$(dirname "$source")" && pwd)"

echo "$dir"
}

#@public
function bashlets::shell::myself::pid()
{
echo $$
}

#@public
function bashlets::shell::myself::ppid()
{
Expand Down

0 comments on commit 72a7749

Please sign in to comment.