Skip to content

Commit 4f76ca6

Browse files
bors[bot]Marwes
andauthored
Merge #778
778: fix: Don't depend on ansi_term in windows to make windows 7 work r=Marwes a=Marwes Fixes #777 Co-authored-by: Markus Westerlind <[email protected]>
2 parents b910eea + 4f64230 commit 4f76ca6

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ branches:
1818

1919
matrix:
2020
include:
21-
- rust: nightly-2019-05-20
21+
- rust: nightly-2019-08-30
2222
- rust: beta
2323
- rust: stable
2424
env: ARCH=i686
@@ -35,7 +35,7 @@ matrix:
3535
- BENCH_DEFAULT_FEATURES_CHECK=1
3636
- TARGET=x86_64-unknown-linux-gnu
3737

38-
- rust: nightly-2019-05-20
38+
- rust: nightly-2019-08-30
3939
env: WASM=1
4040

4141
# Only for deployment

repl/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ gluon_codegen = { path = "../codegen", version = "0.12.0" } # GLUON
2727
gluon_format = { version = "0.12.0", path = "../format" } # GLUON
2828
gluon_doc = { version = "0.12.0", path = "../doc" } # GLUON
2929

30-
ansi_term = "0.12"
3130
app_dirs = "1.0.0"
3231
futures = "0.1.11"
3332
futures-cpupool = "0.1"
@@ -48,6 +47,9 @@ codespan-reporting = "0.3"
4847
serde = "1"
4948
serde_derive = "1"
5049

50+
[target.'cfg(not(windows))'.dependencies]
51+
ansi_term = "0.12"
52+
5153
[dev-dependencies]
5254
pretty_assertions = "0.6"
5355

repl/src/repl.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,12 @@ impl rustyline::highlight::Highlighter for Completer {
190190

191191
fn highlight_hint<'h>(&self, hint: &'h str) -> Cow<'h, str> {
192192
// TODO Detect when windows supports ANSI escapes
193-
if cfg!(windows) {
193+
#[cfg(windows)]
194+
{
194195
Cow::Borrowed(hint)
195-
} else {
196+
}
197+
#[cfg(not(windows))]
198+
{
196199
use ansi_term::Style;
197200
Cow::Owned(Style::new().dimmed().paint(hint).to_string())
198201
}

scripts/install_sccache.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ else
88
TARGET='x86_64-unknown-linux-musl'
99
fi
1010

11-
SCCACHE_VERSION="sccache-0.2.8-${TARGET}"
12-
curl -L "https://github.com/mozilla/sccache/releases/download/0.2.8/$SCCACHE_VERSION.tar.gz" | tar -xvz
11+
VERSION="0.2.10"
12+
SCCACHE_VERSION="sccache-${VERSION}-${TARGET}"
13+
curl -L "https://github.com/mozilla/sccache/releases/download/${VERSION}/$SCCACHE_VERSION.tar.gz" | tar -xvz
1314
mv $SCCACHE_VERSION/sccache .
1415
chmod +x ./sccache
1516
mv ./sccache $HOME/bin/

0 commit comments

Comments
 (0)