{"record":{"id":"62150c17d576c350","repo":"ipfs/kubo","slug":"expecting-one-argument-name","errorCode":null,"errorMessage":"expecting one argument: name","messagePattern":"expecting one argument: name","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/commands/pin/remotepin.go","lineNumber":550,"sourceCode":"\t},\n\tArguments: []cmds.Argument{\n\t\tcmds.StringArg(pinServiceNameOptionName, true, false, \"Name of remote pinning service to remove.\"),\n\t},\n\tOptions: []cmds.Option{},\n\tType:    nil,\n\tRun: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {\n\t\tcfgRoot, err := cmdenv.GetConfigRoot(env)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\trepo, err := fsrepo.Open(cfgRoot)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdefer repo.Close()\n\n\t\tif len(req.Arguments) != 1 {\n\t\t\treturn fmt.Errorf(\"expecting one argument: name\")\n\t\t}\n\t\tname := req.Arguments[0]\n\n\t\tcfg, err := repo.Config()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif cfg.Pinning.RemoteServices != nil {\n\t\t\tdelete(cfg.Pinning.RemoteServices, name)\n\t\t}\n\t\treturn repo.SetConfig(cfg)\n\t},\n}\n\nvar lsRemotePinServiceCmd = &cmds.Command{\n\tHelptext: cmds.HelpText{\n\t\tTagline:          \"List remote pinning services.\",\n\t\tShortDescription: \"List remote pinning services.\",","sourceCodeStart":532,"sourceCodeEnd":568,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/commands/pin/remotepin.go#L532-L568","documentation":"The `ipfs pin remote rm` command requires exactly one positional argument: the remote service name whose configuration entry should be removed. If the user supplies zero arguments or more than one, the command returns this usage error before touching the config.","triggerScenarios":"Calling `ipfs pin remote rm` with no arguments, or passing extra positional arguments (e.g. `ipfs pin remote rm web3.storage extra`). The check is `len(req.Arguments) != 1` after the repo is opened.","commonSituations":"Copy-pasting a command and dropping the name argument; quoting mistakes in shell scripts leaving an empty argument that the CLI strips out; old scripts written for a different CLI syntax that accepted additional arguments.","solutions":["Run the command with exactly one argument: `ipfs pin remote rm <service-name>` (e.g. `ipfs pin remote rm web3.storage`).","Check `ipfs pin remote ls` first to confirm the exact service name spelling.","In scripts, quote the name and verify it is non-empty before invoking: `ipfs pin remote rm \"$SERVICE\"`.","Run `ipfs pin remote rm --help` to see the exact expected argument syntax for your kubo version."],"exampleFix":"// before\nipfs pin remote rm\n// after\nipfs pin remote rm web3.storage","handlingStrategy":"validation","validationCode":"#!/usr/bin/env bash\nif [ \"$#\" -ne 1 ] || [ -z \"$1\" ]; then\n  echo \"usage: ipfs pin remote rm <service-name>\" >&2\n  exit 2\nfi\nipfs pin remote rm \"$1\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always quote the service name argument in scripts","Verify argument counts before invoking the CLI from automation","Check `ipfs pin remote rm --help` when upgrading kubo versions"],"tags":["cli","argument-validation","remote-pinning","usage-error"],"backgroundTag":"missing-required-argument","analyzedSha":"329838acdfafae224582930457efe80aa217afc0","analyzedAt":"2026-09-03T18:30:52.135Z","contentChangedAt":"2026-09-03T18:30:52.135Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}