mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
no tar for scripts
This commit is contained in:
@@ -1123,9 +1123,12 @@ pub async fn install_s9pk<R: AsyncRead + AsyncSeek + Unpin>(
|
||||
if tokio::fs::metadata(&script_dir).await.is_err() {
|
||||
tokio::fs::create_dir_all(&script_dir).await?;
|
||||
}
|
||||
if let Some(hdl) = rdr.scripts().await? {
|
||||
let mut tar = tokio_tar::Archive::new(hdl);
|
||||
tar.unpack(script_dir).await?;
|
||||
if let Some(mut hdl) = rdr.scripts().await? {
|
||||
tokio::io::copy(
|
||||
&mut hdl,
|
||||
&mut File::open(script_dir.join("embassy.js")).await?,
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
@@ -106,9 +106,8 @@ pub fn pack(#[context] ctx: SdkContext, #[arg] path: Option<PathBuf>) -> Result<
|
||||
std::io::Cursor::new(assets.into_inner()?)
|
||||
})
|
||||
.scripts({
|
||||
let mut scripts = tar::Builder::new(Vec::new());
|
||||
scripts.append_dir_all("scripts", path.join(manifest.assets.scripts_path()))?;
|
||||
std::io::Cursor::new(scripts.into_inner()?)
|
||||
let script_path = path.join(manifest.assets.scripts_path()).join("embassy.js");
|
||||
File::open(script_path)?
|
||||
})
|
||||
.build()
|
||||
.pack(&ctx.developer_key()?)?;
|
||||
|
||||
Reference in New Issue
Block a user