-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Labels
Description
Hi,
We're using a node binary to implement a small IDL compiler:
node_binary(
name = "gen",
srcs = [...]
...)The binary gets used later in a genrule, something like this:
genrule(
name = "gen_osl",
srcs = ["example/file.idl"],
tools = [":gen"],
cmd = "$(location :gen) ...options... $(location example/file.idl)",
...)However, we find that the generated runner for the gen target has the following content,
#!/usr/bin/env bash
set -e
ROOT=$(dirname $0)
export PATH="$ROOT:$PATH"
cd $ROOT/gen_bundle && exec node node_modules/platform/tools/reaktor/gen_module $@- Is there a special reason as to why to chdir into the
gen_bundledirectory? It destroys our ability to locate the source file. - Do you know of some other way I could work around?