Skip to content

Commit a12e00d

Browse files
authored
Merge pull request #93 from r-lib/feature/no-translations
2 parents 472cace + 84b99e2 commit a12e00d

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

NEWS.md

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
* `rig add` now correctly installs pak into the user library, instead of
1818
the system library, even if the user library did not exist before.
1919

20+
* On Windows, `rig add ... --without-translations` installs R without
21+
message translations. This is useful if you prefer using R in
22+
English on a non-English system (#88).
23+
2024
# rig 0.4.1
2125

2226
* `rig rstudio <version>` and `rig rstudio <version> <project>` work properly

src/args.rs

+10
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,16 @@ pub fn rig_app() -> Command<'static> {
140140
);
141141
}
142142

143+
#[cfg(target_os = "windows")]
144+
{
145+
cmd_add = cmd_add.arg(
146+
Arg::new("without-translations")
147+
.help("Do not install translations.")
148+
.long("without-translations")
149+
.required(false),
150+
);
151+
}
152+
143153
#[cfg(target_os = "macos")]
144154
{
145155
cmd_add = cmd_add.arg(

src/windows.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,15 @@ pub fn sc_add(args: &ArgMatches) -> Result<(), Box<dyn Error>> {
4545
let target_path = Path::new(&target);
4646

4747
info!("Installing {}", target_path.display());
48+
49+
let mut cmd_args = vec!["/VERYSILENT", "/SUPPRESSMSGBOXES"];
50+
if args.is_present("without-translations") {
51+
cmd_args.push("/components=main,x64,i386");
52+
}
53+
4854
println!("--nnn-- Start of installer output -----------------");
4955
let status = Command::new(&target)
50-
.args(["/VERYSILENT", "/SUPPRESSMSGBOXES"])
56+
.args(cmd_args)
5157
.spawn()?
5258
.wait()?;
5359
println!("--uuu-- End of installer output -------------------");

0 commit comments

Comments
 (0)