mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Add --include-fonts flag for archive (#277)
This commit is contained in:
parent
0a26083232
commit
0da81a4814
4 changed files with 228 additions and 7 deletions
|
|
@ -6,7 +6,7 @@ use std::path::{Path, PathBuf};
|
|||
use std::pin::Pin;
|
||||
use std::process::{Command, Stdio};
|
||||
use std::task::{Context, Poll};
|
||||
use std::{env, io};
|
||||
use std::{env, fs, io};
|
||||
use tempfile::{Builder, NamedTempFile};
|
||||
use tokio::io::{AsyncRead, ReadBuf};
|
||||
|
||||
|
|
@ -46,6 +46,12 @@ pub fn tempfile<S: AsRef<str>>(suffix: S) -> io::Result<NamedTempFile> {
|
|||
Ok(tempfile)
|
||||
}
|
||||
|
||||
pub fn cache_dir<S: AsRef<str>>(name: S) -> io::Result<PathBuf> {
|
||||
let cache_dir = temp_directory().join(format!(".crunchy-cli_{}_cache", name.as_ref()));
|
||||
fs::create_dir_all(&cache_dir)?;
|
||||
Ok(cache_dir)
|
||||
}
|
||||
|
||||
pub struct TempNamedPipe {
|
||||
name: String,
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue