Skip to content

Commit

Permalink
tmpfs-automount: set XDG_RUNTIME_DIR if not set
Browse files Browse the repository at this point in the history
  • Loading branch information
codyopel committed Oct 6, 2020
1 parent 5d7a136 commit 437ece6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"dependencies": [
"github.com/chlorm/elvish-stl"
"github.com/chlorm/elvish-stl",
"github.com/chlorm/elvish-xdg"
]
}
5 changes: 4 additions & 1 deletion tmpfs-automount.elv
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ use github.com/chlorm/elvish-xdg/xdg

fn main {
# Make sure XDG_RUNTIME_DIR is configured.
local:capture = (xdg:get-dir XDG_RUNTIME_DIR)
local:run = (xdg:get-dir XDG_RUNTIME_DIR)
if (not (==s (get-env XDG_RUNTIME_DIR) $run)) {
set-env XDG_RUNTIME_DIR $run
}

local:mount-cache = $false
try {
Expand Down

0 comments on commit 437ece6

Please sign in to comment.