E5ten / pacaur

An AUR helper that minimizes user interaction
https://bbs.archlinux.org/viewtopic.php?pid=1755144#p1755144
ISC License
110 stars 9 forks source link

Incorrect exit code on SIGINT #20

Closed Robbe7730 closed 4 years ago

Robbe7730 commented 4 years ago
Version

pacaur -v

pacaur 4.8.6
Description

When sending a SIGINT to pacaur by pressing ctrl+c when it is building a package, the exit code remains 0, indicating it finished succesfully. The command makepkg exits with exit code 130 when interrupted by SIGINT. This makes it practically impossible for a script to distinguish between a succesful update and an update that was interrupted by the user.

Output

pacaur -S pacaur

:: Package pacaur not found in repositories, trying AUR...
:: resolving dependencies...
:: looking for inter-conflicts...
:: pacaur-4.8.6-1 is up to date -- reinstalling

AUR Packages  (1) pacaur-4.8.6-1

:: Proceed with installation? [Y/n]
:: Retrieving package(s)...
update complete: /home/[username]/.cache/pacaur/pacaur
:: pacaur build files are up-to-date -- skipping
:: Checking pacaur integrity...
==> Making package: pacaur 4.8.6-1 ([time removed])
==> Retrieving sources...
  -> Updating pacaur git repo...
Fetching origin
==> Validating source files with sha256sums...
    pacaur ... Skipped
:: Preparing pacaur...
==> Making package: pacaur 4.8.6-1 ([time removed])
==> WARNING: Skipping dependency checks.
==> Retrieving sources...
  -> Updating pacaur git repo...
Fetching origin
^C
==> ERROR: Aborted by user! Exiting...

echo $?

0

cd ~/.cache/pacaur/pacaur && makepkg -f

==> Making package: pacaur 4.8.6-1 ([time removed])
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating pacaur git repo...
Fetching origin
^C
==> ERROR: Aborted by user! Exiting...

echo $?

130
Debug output

Not relevant for the question, will post as a comment if necessary.

Morganamilo commented 4 years ago

Well pacaur was successfully interrupted by the user ;)

E5ten commented 4 years ago

Fixed in master