我的回答主要基于 Jasper de Vries'one:
似乎 Netbeans 只是简单地添加了一些 sass 编译器不再支持的附加参数。
在我的例子中,Netbeans 发出的完整命令是:
"/home/alex/tools/dart-sass/sass" "--cache-location" "/home/alex/snap/netbeans/common/cache/12.0/sass-compiler" "--debug-info " "/home/alex/projects/alexgheorghiu.com/web/aaa.scss" "/home/alex/projects/alexgheorghiu.com/web/aaa.css"
所以前3个参数
"--cache-location" "/home/alex/snap/netbeans/common/cache/12.0/sass-compiler" "--debug-info"
必须“删除”或忽略。
因此您需要更改 sass 文件或复制它(最安全的方式)
并添加
shift 3
说明。
因此,如果您从原始版本开始,例如:
#!/bin/sh
# This script drives the standalone dart-sass package, which bundles together a
# Dart executable and a snapshot of dart-sass.
follow_links() {
file="$1"
while [ -h "$file" ]; do
# On Mac OS, readlink -f doesn't work.
file="$(readlink "$file")"
done
echo "$file"
}
# Unlike $0, $BASH_SOURCE points to the absolute path of this file.
path=`dirname "$(follow_links "$0")"`
exec "$path/src/dart" "$path/src/sass.snapshot" "$@"
你需要得到类似的结果:
#!/bin/sh
# This script drives the standalone dart-sass package, which bundles together a
# Dart executable and a snapshot of dart-sass.
follow_links() {
file="$1"
while [ -h "$file" ]; do
# On Mac OS, readlink -f doesn't work.
file="$(readlink "$file")"
done
echo "$file"
}
# Unlike $0, $BASH_SOURCE points to the absolute path of this file.
path=`dirname "$(follow_links "$0")"`
shift 3
exec "$path/src/dart" "$path/src/sass.snapshot" "$@"
一个有趣的方面是 Netbeans 开发人员知道这个错误(请参阅:Could not find an option named "cache-location")但我无法实现这一点,因为在我的 Xubuntu 18 下,Netbeans 是一个“快照”,因此它的 netbeans.conf 文件是只读。
但如果您可以修改该文件,它可能是一个更清洁的解决方案。