question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

--output_base does not replace user prefix ~

See original GitHub issue

Description of the problem / feature request:

The --output_base option does not seem to replace the user home directory ~ pattern.

Feature requests: what underlying problem are you trying to solve with this feature?

I’d like to specify an --output_base relative to the user home directory.

Bugs: what’s the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Add a path with ~ in your .bazelrc:

$ tail -n 1 .bazelrc 
startup --output_base ~/fromage

Build:

$ bazel build //...

Look is the different directories and observe that the ~ was not replaced:

$ ls ~/fromage
ls: cannot access '/home/guillaume/fromage': No such file or directory
$  ls ./\~/fromage
bazel-remote-logs  bazel-workers  command.log  DO_NOT_BUILD_HERE  execroot  external  install  java.log  java.log.paddle.guillaume.log.java.20210125-170253.13883  javalog.properties  lock  README  server

What operating system are you running Bazel on?

Linux

What’s the output of bazel info release?

$ kazel info release
INFO: Invocation ID: b730d2ac-1af0-4106-842c-754a0b37e740
release 3.3.1- (@non-git)

If bazel info release returns “development version” or “(@non-git)”, tell us how you built Bazel.

I picked the one from nixpkgs.

Please note that it works with a few other options, such as --disk_cache.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
aranguyencommented, Sep 14, 2022

@guibou bazelrc does not have support for shell expansion. We unfortunately do not have plan to prioritize this any time soon. I’m marking this as duplicate of https://github.com/bazelbuild/bazel/issues/10904. Please feel free to share your thoughts in the doc mentioned in https://github.com/bazelbuild/bazel/issues/10904#issuecomment-1212144290

0reactions
brentleyjonescommented, Sep 14, 2022

https://github.com/bazelbuild/bazel/pull/15417 is an example of changing a flag to accept tildes. I think we can do that for this flag, and others, as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Any reason to change the C## common user prefix? - dbi Blog
In 12.1.0.1 the common user prefix was set to C## by an underscore parameter. In 12.1.0.2 it's a documented parameter and you can...
Read more >
Default samtools sort temp-prefix leads to data corruption ...
Imho in case of - as input, samtools should rather use the output name (-o) as prefix or if this one is not...
Read more >
Tesseract running error - ocr - Stack Overflow
Could not initialize tesseract. According to compiling guide, I used export TESSDATA_PREFIX='/usr/local/share/' to point my tessdata directory. Maybe I should ...
Read more >
Commands and Options | Bazel
To match the generated files (such as genrule outputs) Bazel can only use the execution path. In this case the regexp shouldn't start...
Read more >
error running presplit_map.py - Bioconductor Forum
Hi,. May I ask a naive question on what could be wrong when I try to run the chimeric alignment using presplit_map.py from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found