(cmd *cobra.Command, debugFull, experimental bool)
| 70 | } |
| 71 | |
| 72 | func getComposeOptions(cmd *cobra.Command, debugFull, experimental bool) (composer.Options, error) { |
| 73 | nerdctlCmd, nerdctlArgs := helpers.GlobalFlags(cmd) |
| 74 | projectDirectory, err := cmd.Flags().GetString("project-directory") |
| 75 | if err != nil { |
| 76 | return composer.Options{}, err |
| 77 | } |
| 78 | envFile, err := cmd.Flags().GetString("env-file") |
| 79 | if err != nil { |
| 80 | return composer.Options{}, err |
| 81 | } |
| 82 | projectName, err := cmd.Flags().GetString("project-name") |
| 83 | if err != nil { |
| 84 | return composer.Options{}, err |
| 85 | } |
| 86 | files, err := cmd.Flags().GetStringArray("file") |
| 87 | if err != nil { |
| 88 | return composer.Options{}, err |
| 89 | } |
| 90 | ipfsAddressStr, err := cmd.Flags().GetString("ipfs-address") |
| 91 | if err != nil { |
| 92 | return composer.Options{}, err |
| 93 | } |
| 94 | profiles, err := cmd.Flags().GetStringArray("profile") |
| 95 | if err != nil { |
| 96 | return composer.Options{}, err |
| 97 | } |
| 98 | |
| 99 | return composer.Options{ |
| 100 | Project: projectName, |
| 101 | ProjectDirectory: projectDirectory, |
| 102 | ConfigPaths: files, |
| 103 | Profiles: profiles, |
| 104 | EnvFile: envFile, |
| 105 | NerdctlCmd: nerdctlCmd, |
| 106 | NerdctlArgs: nerdctlArgs, |
| 107 | DebugPrintFull: debugFull, |
| 108 | Experimental: experimental, |
| 109 | IPFSAddress: ipfsAddressStr, |
| 110 | }, nil |
| 111 | } |
no test coverage detected
searching dependent graphs…