Skip to content

Commit

Permalink
indicate that exe dir should be in the path
Browse files Browse the repository at this point in the history
  • Loading branch information
plicease committed Dec 27, 2021
1 parent a7de54f commit 2ccc235
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -197,7 +197,8 @@ my $exe = $xdg->exe_dir;
```

Returns the user-specific executable files directory `$HOME/.local/bin`, if it exists. If it
does not exist then `undef` will be returned.
does not exist then `undef` will be returned. This directory _should_ be added to the `PATH`
according to the spec.

## lookup\_data\_file

Expand Down
3 changes: 2 additions & 1 deletion lib/File/XDG.pm
Expand Up @@ -365,7 +365,8 @@ sub config_dirs_list {
my $exe = $xdg->exe_dir;
Returns the user-specific executable files directory C<$HOME/.local/bin>, if it exists. If it
does not exist then C<undef> will be returned.
does not exist then C<undef> will be returned. This directory I<should> be added to the C<PATH>
according to the spec.
=cut

Expand Down
3 changes: 1 addition & 2 deletions t/file_xdg.t
Expand Up @@ -65,6 +65,7 @@ subtest 'noenv' => sub {
subtest 'exe_dir' => sub {
my $home = File::Temp->newdir;
local $ENV{HOME} = $home;
local *Win32::GetFolderPath = sub { return $home };

my $xdg = File::XDG->new( name => 'foo' );

Expand All @@ -77,10 +78,8 @@ subtest 'exe_dir' => sub {
};

subtest 'lookup' => sub {
my $home = File::Temp->newdir;
my $data = File::Temp->newdir;
my $config = File::Temp->newdir;
local $ENV{HOME} = $home;
local $ENV{XDG_DATA_DIRS} = $data;
local $ENV{XDG_CONFIG_DIRS} = $config;

Expand Down

0 comments on commit 2ccc235

Please sign in to comment.