Show absolute path of non-existent file in error message
This commit is contained in:
parent
c6273bbad9
commit
c00001312c
@ -16,8 +16,8 @@ Add AppVeyor to a template's plugins to add AppVeyor CI support.
|
||||
if isempty(config_file)
|
||||
config_file = joinpath(DEFAULTS_DIR, "appveyor.yml")
|
||||
end
|
||||
if !isfile(abspath(config_file))
|
||||
throw(ArgumentError("File $config_file does not exist"))
|
||||
if !isfile(config_file)
|
||||
throw(ArgumentError("File $(abspath(config_file)) does not exist"))
|
||||
end
|
||||
end
|
||||
new(AbstractString[], config_file)
|
||||
|
@ -16,8 +16,8 @@ Add CodeCov to a template's plugins to enable CodeCov coverage reports.
|
||||
if isempty(config_file)
|
||||
config_file = joinpath(DEFAULTS_DIR, "codecov.yml")
|
||||
end
|
||||
if !isfile(abspath(config_file))
|
||||
throw(ArgumentError("File $config_file does not exist"))
|
||||
if !isfile(config_file)
|
||||
throw(ArgumentError("File $(abspath(config_file)) does not exist"))
|
||||
end
|
||||
end
|
||||
new(["*.jl.cov", "*.jl.*.cov", "*.jl.mem"], config_file)
|
||||
|
@ -13,7 +13,7 @@ Add GitHubPages to a template's plugins to add Documenter.jl support via GitHub
|
||||
function GitHubPages(; assets::Vector{String}=String[])
|
||||
for file in assets
|
||||
if !isfile(file)
|
||||
throw(ArgumentError("Asset file $file does not exist"))
|
||||
throw(ArgumentError("Asset file $(abspath(file)) does not exist"))
|
||||
end
|
||||
end
|
||||
# Windows Git recognizes these paths as well.
|
||||
|
@ -16,8 +16,8 @@ Add TravisCI to a template's plugins to add Travis CI support.
|
||||
if isempty(config_file)
|
||||
config_file = joinpath(DEFAULTS_DIR, "travis.yml")
|
||||
end
|
||||
if !isfile(abspath(config_file))
|
||||
throw(ArgumentError("File $config_file does not exist"))
|
||||
if !isfile(config_file)
|
||||
throw(ArgumentError("File $(abspath(config_file)) does not exist"))
|
||||
end
|
||||
end
|
||||
new(AbstractString[], config_file)
|
||||
|
Loading…
Reference in New Issue
Block a user