Skip to content
Snippets Groups Projects
Commit 8daa0f4e authored by Sebastien Luttringer's avatar Sebastien Luttringer
Browse files

cat command display a warning if no file is selected by pattern

parent aea46f1f
No related branches found
No related tags found
No related merge requests found
......@@ -617,7 +617,10 @@ class PackageImage(Image):
'''
Display filename in the tarball
'''
for filename in self._tarball.getnames(glob_pattern=filename):
filelist = self._tarball.getnames(glob_pattern=filename)
if len(filelist) == 0:
warn("No file matching %s" % filename)
for filename in filelist:
arrow(filename)
out(self._tarball.get_str(filename))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment