Skip to content

Commit a692c89

Browse files
authored
fix(bundler): create tauri tools dir first. make tools executable. (#11852)
* not sure what's going on yet * . * fix(bundler): try to create tauri tools dir * Discard changes to .github/workflows/test-cli-js.yml * fix
1 parent 8ba5e16 commit a692c89

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

crates/tauri-bundler/src/bundle/linux/appimage.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
4747
dirs::cache_dir().map_or_else(|| output_path.to_path_buf(), |p| p.join("tauri"))
4848
});
4949

50+
fs::create_dir_all(&tools_path)?;
51+
5052
let linuxdeploy_path = prepare_tools(&tools_path, tools_arch)?;
5153

5254
let package_dir = settings.project_out_directory().join("bundle/appimage_deb");
@@ -257,9 +259,8 @@ fn prepare_tools(tools_path: &Path, arch: &str) -> crate::Result<PathBuf> {
257259
fn write_and_make_executable(path: &Path, data: Vec<u8>) -> std::io::Result<()> {
258260
use std::os::unix::fs::PermissionsExt;
259261

260-
let mut file = fs::File::create(path)?;
261-
file.write_all(&data)?;
262-
let mut perms = file.metadata()?.permissions();
263-
perms.set_mode(0o770);
262+
fs::write(path, &data)?;
263+
fs::set_permissions(path, fs::Permissions::from_mode(0o770))?;
264+
264265
Ok(())
265266
}

packages/cli/__tests__/template.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ describe('[CLI] @tauri-apps/cli template', () => {
7171
const config = readFileSync(configPath).toString()
7272
writeFileSync(configPath, config.replace('com.tauri.dev', 'com.tauri.test'))
7373

74-
await cli.run(['build'])
74+
await cli.run(['build', '-vvv'])
7575
process.chdir(cwd)
7676
})
7777
})

0 commit comments

Comments
 (0)