Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: jaimergp <jaimergp@users.noreply.github.com>
  • Loading branch information
marcoesters and jaimergp authored May 15, 2024
1 parent 677c0af commit 0314f61
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion menuinst/platforms/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def _command(self) -> str:

def _write_desktop_file(self):
if self.location.exists():
log.warning(f"Overwriting existing file at {self.location}.")
log.warning("Overwriting existing file at %s.", self.location)

lines = [
"[Desktop Entry]",
Expand Down
5 changes: 3 additions & 2 deletions menuinst/platforms/osx.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,11 @@ def _precreate(self):
def create(self) -> Tuple[Path]:
if self.location.exists():
message = (
f"App already exista at {self.location}. "
f"App already exists at {self.location}. "
"Please remove the existing shortcut before installing. "
"If you used conda to install this package, "
"re-run the installation with --no-shortcuts."
"reinstall the package with --force-reinstall to "
"create the shortcut once the location is cleared."
)
raise RuntimeError(message)
log.debug("Creating %s", self.location)
Expand Down
2 changes: 1 addition & 1 deletion menuinst/platforms/win.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def create(self) -> Tuple[Path, ...]:
# winshortcut.create_shortcut(path, description, filename, arguments="",
# workdir=None, iconpath=None, iconindex=0, app_id="")
if Path(path).exists():
log.warning(f"Overwriting existing link at {path}.")
log.warning("Overwriting existing link at %s.", path)
create_shortcut(
target_path,
self._shortcut_filename(ext=""),
Expand Down

0 comments on commit 0314f61

Please sign in to comment.