Skip to content

Commit e12bb81

Browse files
committed
Fix for README generation workflow
1 parent 516482f commit e12bb81

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

src/generate_readme.jl

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,20 @@ function generate_readmes!(paths::AbstractVector{<:AbstractString})
1313
end
1414
return nothing
1515
end
16+
1617
function generate_readme!(path::AbstractString)
1718
isitensorpkg(path) ||
1819
error("Can't generate README: not an ITensor package directory: `$path`.")
1920
cd(joinpath(path, "docs")) do
2021
julia = Base.julia_cmd()
21-
cmd = `$(julia) --project=. --startup-file=no make_readme.jl`
22-
# `setenv` is needed so that Julia properly see the local package environment
23-
# (otherwise it can't seem to load packages).
24-
run(setenv(cmd, "JULIA_LOAD_PATH" => ":"))
22+
code = """
23+
using Pkg: Pkg
24+
Pkg.instantiate()
25+
error()
26+
include("make_readme.jl")
27+
"""
28+
cmd = `$(julia) --project=. --startup-file=no -e "$(code)"`
29+
run(setenv(cmd, "JULIA_LOAD_PATH" => "@:@stdlib"))
2530
return nothing
2631
end
2732
return nothing

0 commit comments

Comments
 (0)