posit-dev / posit-dev/positron

Add R/Python defined as Bash alias when looking for binaries

Open
#6,475 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement lang: r support
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:

  1. Download our R Singularity build script here: https://raw.githubusercontent.com/accre/singularity/refs/heads/master/accre-internal/Singularity.R-4.4.2
  2. Build a Singularity container with it: sudo singularity build R-4.4.2.sif Singularity.R-4.4.2
  3. Add a Bash alias to start R: alias R="singularity run ~/sif/R/R-4.4.2.sif /usr/local/bin/R"
  4. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.