mirror of
https://github.com/containers/podman-compose.git
synced 2025-01-23 22:39:04 +01:00
Fix 'podman-compose version' with no compose file in the working directory
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
parent
5971f57130
commit
a4b8b5e709
@ -800,7 +800,6 @@ class PodmanCompose:
|
||||
|
||||
def run(self):
|
||||
args = self._parse_args()
|
||||
self._parse_compose_file()
|
||||
podman_path = args.podman_path
|
||||
if podman_path != 'podman':
|
||||
if os.path.isfile(podman_path) and os.access(podman_path, os.X_OK):
|
||||
@ -822,6 +821,8 @@ class PodmanCompose:
|
||||
exit(1)
|
||||
print("using podman version: "+self.podman_version)
|
||||
cmd_name = args.command
|
||||
if (cmd_name != "version"):
|
||||
self._parse_compose_file()
|
||||
cmd = self.commands[cmd_name]
|
||||
cmd(self, args)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user