Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

termux-microphone-record should exit 1 if recording is already in progress or the file already exists #648

Open
sudomain opened this issue Dec 21, 2023 · 0 comments

Comments

@sudomain
Copy link

Problem description

termux-microphone-record currently exits 0 even when:

  1. Recording already in progress!
  2. The file specified with -f already exists (File: fileb already exists! Please specify a different filename)

This makes &&, ||, and checking $? unusable.

Steps to reproduce

.../0/TODO_audio_files $ termux-microphone-record -f fileb
Recording started: /storage/emulated/0/TODO_audio_files/fileb
Max Duration: 15:00
.../0/TODO_audio_files $ termux-microphone-record -f fileb

File: fileb already exists! Please specify a different filename
.../0/TODO_audio_files $ echo $?
0
.../0/TODO_audio_files $ termux-microphone-record -f filec

Recording already in progress!
.../0/TODO_audio_files $ echo $?
0

Expected behavior

exit 1 for the mentioned situations

Additional information

  • termux-api application version:
  • termux-api package version (installed through apt):
  • Android OS version:
  • Device model:

Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=4741
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
Packages CPU architecture:
aarch64
Subscribed repositories:

sources.list

deb https://packages.termux.org/apt/termux-main stable main

x11-repo (sources.list.d/x11.list)

deb https://packages.termux.org/apt/termux-x11 x11 main
Updatable packages:
All packages up to date
termux-tools version:
1.39.6
Android version:
11
Kernel build information:
Linux localhost 4.4.223-g52750b8f2138-ab6846512 #1 SMP PREEMPT Fri Sep 18 09:49:34 UTC 2020 aarch64 Android
Device manufacturer:
Google
Device model:
Pixel 2
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.api versionCode:51
com.termux.boot versionCode:7
com.termux.widget versionCode:13
com.termux.window versionCode:15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant