Show absolute path of non-existent file in error message

This commit is contained in:
Chris de Graaf 2017-08-16 00:33:07 -05:00
parent c6273bbad9
commit c00001312c
4 changed files with 7 additions and 7 deletions

View File

@ -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)

View 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)

View 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.

View File

@ -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)