cli icon indicating copy to clipboard operation
cli copied to clipboard

-C executes multiple times for `compute publish`

Open JakeChampion opened this issue 8 months ago • 0 comments

Version

❯ fastly version
Fastly CLI version v10.5.0 (2933018f)
Built with go version go1.21.3 linux/amd64
Viceroy version: viceroy 0.9.1

What happened

When running fastly compute publish --profile polyfill --verbose -i -C .. the project directory gets changed multiple times, when it should only be changed once (it should only go up one directory)

It looks like the -C flag is read and executed by the build step and then again by the deploy step.

Below is the full output of the command:

❯ fastly compute publish --profile polyfill --verbose -i -C ..
Fastly API token provided via config file (profile: polyfill)
Fastly API endpoint: https://api.fastly.com

INFO: Changed project directory to '/Users/jakechampion/src/financial-times/polyfill-service'

✓ Verifying fastly.toml
✓ Identifying package name
✓ Identifying toolchain

INFO: Creating ./bin directory (for Wasm binary)

Build script to execute:
        sh -c cargo build --bin service --release --target wasm32-wasi --color always -p service && cp target/wasm32-wasi/release/service.wasm bin/main.wasm

INFO: Command output:
--------------------------------------------------------------------------------
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   /Users/jakechampion/src/financial-times/polyfill-service/service/Cargo.toml
workspace: /Users/jakechampion/src/financial-times/polyfill-service/Cargo.toml
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   /Users/jakechampion/src/financial-times/polyfill-service/library/Cargo.toml
workspace: /Users/jakechampion/src/financial-times/polyfill-service/Cargo.toml
    Finished release [optimized + debuginfo] target(s) in 0.06s
--------------------------------------------------------------------------------

✓ Running [scripts.build]

Wasm module 'magic':
        []byte{0x0, 0x61, 0x73, 0x6d}

Wasm module 'version':
        1

✓ Creating package archive

SUCCESS: Built package (pkg/polyfill-service-rs.tar.gz)

INFO: Changed project directory to '/Users/jakechampion/src/financial-times/polyfill-service'

INFO: Changed project directory to '/Users/jakechampion/src/financial-times'

✗ Verifying fastly.toml

ERROR: error reading fastly.toml.

Ensure the Fastly CLI is being run within a directory containing a fastly.toml file. Run `fastly compute init` to ensure a correctly configured manifest. See more at https://developer.fastly.com/reference/fastly-toml/

JakeChampion avatar Oct 20 '23 11:10 JakeChampion