refactor: if base dir specified in the env, then it will be used
This commit is contained in:
parent
1939f3af3d
commit
31f0b9d39c
3 changed files with 5 additions and 2 deletions
3
.envrc
Normal file
3
.envrc
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
dotenv
|
||||
|
||||
env_vars_required GOPHER_DIR
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,2 +1,3 @@
|
|||
/playground/
|
||||
/.tests/
|
||||
/.env
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
-- NOTE: there's a probably a better way to do this
|
||||
local base_dir = vim.fn.expand "%:p:h"
|
||||
local base_dir = vim.env.GOPHER_DIR or vim.fn.expand "%:p:h"
|
||||
local fixtures_dir = vim.fs.joinpath(base_dir, "/spec/fixtures/")
|
||||
|
||||
---@class gopher.TestUtils
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue