fix: resolve build errors in pass_mgr, pcexec, and safe-restart
- Fix Go syntax error: use BoolVar for --username flag instead of string - Fix TypeScript type errors: filter undefined values from process.env - Fix TypeScript type error: add type assertion for fetch response - Add .gitignore to exclude node_modules and build outputs
This commit is contained in:
@@ -41,7 +41,6 @@ type Config struct {
|
||||
var (
|
||||
workspaceDir string
|
||||
agentID string
|
||||
username string
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -70,7 +69,8 @@ func main() {
|
||||
}
|
||||
|
||||
func getCmd() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
var showUsername bool
|
||||
cmd := &cobra.Command{
|
||||
Use: "get [key]",
|
||||
Short: "Get password for a key",
|
||||
Args: cobra.ExactArgs(1),
|
||||
@@ -81,13 +81,15 @@ func getCmd() *cobra.Command {
|
||||
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
if username {
|
||||
if showUsername {
|
||||
fmt.Println(user)
|
||||
} else {
|
||||
fmt.Println(password)
|
||||
}
|
||||
},
|
||||
}
|
||||
cmd.Flags().BoolVar(&showUsername, "username", false, "Show username instead of password")
|
||||
return cmd
|
||||
}
|
||||
|
||||
func generateCmd() *cobra.Command {
|
||||
|
||||
Reference in New Issue
Block a user