TL;DR: CLI suggests --name regardless of where the conflict occurs. For usability, it would be nice to get additional information like:
Use --skip-services-check if you plan to replace the existing service file at [PATH]
Attempting to create Quadlet files from existing objects, but file conflicts get in the way even when specifying the file location. This is confusing when the --file flag specifies a path that should not conflict, and the services check purpose isn't obvious from the output.
for container in $(sudo podman ps --format {{.Names}}); do
sudo $(which podlet) --file . generate container $container
done
replacing that flag with --file /home/me/podlet (which should be the same as .) didn't make a difference, of course. Output includes (for nginx-proxy/acme-companion):
Error:
0: File name `nginx-proxy` conflicts with existing unit file: /etc/systemd/system/container-nginx-proxy.service
Location:
src/cli.rs:809
Suggestion: Change the generated file's name with `--file` or `--name`. Alternatively, use `--skip-services-check` if this is ok.
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
Error:
0: File name `nginx-proxy-acme` conflicts with existing unit file: /etc/systemd/system/container-nginx-proxy-acme.service
Location:
src/cli.rs:809
Suggestion: Change the generated file's name with `--file` or `--name`. Alternatively, use `--skip-services-check` if this is ok.
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
TL;DR: CLI suggests
--nameregardless of where the conflict occurs. For usability, it would be nice to get additional information like:Attempting to create Quadlet files from existing objects, but file conflicts get in the way even when specifying the file location. This is confusing when the
--fileflag specifies a path that should not conflict, and the services check purpose isn't obvious from the output.replacing that flag with
--file /home/me/podlet(which should be the same as.) didn't make a difference, of course. Output includes (fornginx-proxy/acme-companion):