mirror of
https://github.com/Swatinem/rust-cache
synced 2026-11-23 21:34:18 +00:00
update dependencies, rebuild
This commit is contained in:
+11
-4
@@ -1,14 +1,21 @@
|
||||
import * as core from "@actions/core";
|
||||
import path from "path";
|
||||
|
||||
import { getCmdOutput } from "./utils";
|
||||
import { getCmdOutput } from "./utils.js";
|
||||
|
||||
const SAVE_TARGETS = new Set(["lib", "cdylib", "dylib", "rlib", "staticlib", "proc-macro"]);
|
||||
|
||||
export class Workspace {
|
||||
constructor(public root: string, public target: string) {}
|
||||
constructor(
|
||||
public root: string,
|
||||
public target: string,
|
||||
) {}
|
||||
|
||||
async getPackages(cmdFormat: string, filter: (p: Meta["packages"][0]) => boolean, extraArgs?: string): Promise<Packages> {
|
||||
async getPackages(
|
||||
cmdFormat: string,
|
||||
filter: (p: Meta["packages"][0]) => boolean,
|
||||
extraArgs?: string,
|
||||
): Promise<Packages> {
|
||||
const cmd = "cargo metadata --all-features --format-version 1" + (extraArgs ? ` ${extraArgs}` : "");
|
||||
let packages: Packages = [];
|
||||
try {
|
||||
@@ -16,7 +23,7 @@ export class Workspace {
|
||||
const meta: Meta = JSON.parse(
|
||||
await getCmdOutput(cmdFormat, cmd, {
|
||||
cwd: this.root,
|
||||
env: { ...process.env, "CARGO_ENCODED_RUSTFLAGS": "" },
|
||||
env: { ...process.env, CARGO_ENCODED_RUSTFLAGS: "" },
|
||||
}),
|
||||
);
|
||||
core.debug(`workspace "${this.root}" has ${meta.packages.length} packages`);
|
||||
|
||||
Reference in New Issue
Block a user