Skip to content

Commit

Permalink
fix(package): ignore copy if it is the same file
Browse files Browse the repository at this point in the history
  • Loading branch information
syu-w committed Mar 13, 2024
1 parent b601c77 commit 6ae98a5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion snapcraft/services/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ def write_metadata(self, path: pathlib.Path) -> None:
manifest = lifecycle.generate_manifest()
manifest.to_yaml_file(snap_dir / "manifest.yaml")

shutil.copy(self._snapcraft_yaml_path, snap_dir)
if not self._snapcraft_yaml_path.samefile(
snap_dir / self._snapcraft_yaml_path.name
):
shutil.copy(self._snapcraft_yaml_path, snap_dir)

assets_dir = self._get_assets_dir()
setup_assets(
Expand Down

0 comments on commit 6ae98a5

Please sign in to comment.