posit-dev / posit-dev/positron
Add R/Python defined as Bash alias when looking for binaries
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 184
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 206
Description
System details:
Ubuntu 24.04
Positron and OS details:
Positron Version: 2025.02.0 build 171
Code - OSS Version: 1.96.0
Commit: 55f73310e900d46f5f472b4b7e2baa552aa2f157
Date: 2025-02-10T15:48:36.459Z
Electron: 32.2.6
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Linux x64 6.8.0-54-generic
Interpreter details:
R 4.4.2
Describe the issue:
I have R built as a Singularity container, so I can use the exact same R locally or in a cluster environment. When Positron starts and looks for R/Python binaries, it does not find my local R, presumably because it is defined as a Bash alias rather than a binary in the $PATH.
Steps to reproduce the issue:
- Download our R Singularity build script here:
https://raw.githubusercontent.com/accre/singularity/refs/heads/master/accre-internal/Singularity.R-4.4.2 - Build a Singularity container with it:
sudo singularity build R-4.4.2.sif Singularity.R-4.4.2 - Add a Bash alias to start R:
alias R="singularity run ~/sif/R/R-4.4.2.sif /usr/local/bin/R" - Start Positron. It does not detect my R and add it to the "Start Interpreter" selector.
On Bash, you could use a one-liner to detect R/Python binaries defined as aliases:
# alias | grep -E "alias (R|python)="
alias R='singularity run ~/R-4.4.2-x86-64-v3.sif /usr/local/bin/R'
Expected or desired behavior:
Positron detects my R and puts it under the "Start Interpreter" selector.
Were there any error messages in the UI, Output panel, or Developer Tools console?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the interpreter discovery flow behind the Start Interpreter selector and reproduce the issue on Ubuntu with the R Singularity build and Bash alias described above. Trace how available R/Python interpreters are found, then verify that an alias-backed interpreter is detected and selectable without regressing ordinary PATH-based discovery.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash, typescript
- Domain
- desktop, developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100