diff --git a/core/commands/add.go b/core/commands/add.go index 3ee0d816c..8d6e59099 100644 --- a/core/commands/add.go +++ b/core/commands/add.go @@ -76,7 +76,7 @@ You can now refer to the added file in a gateway, like so: cmds.BoolOption(wrapOptionName, "w", "Wrap files with a directory object."), cmds.BoolOption(hiddenOptionName, "H", "Include files that are hidden. Only takes effect on recursive add."), cmds.StringOption(chunkerOptionName, "s", "Chunking algorithm to use."), - cmds.BoolOption(pinOptionName, "Pin this object when adding. Default: true."), + cmds.BoolOption(pinOptionName, "Pin this object when adding.").Default(true), cmds.BoolOption(rawLeavesOptionName, "Use raw blocks for leaf nodes. (experimental)"), }, PreRun: func(req cmds.Request) error { @@ -135,13 +135,9 @@ You can now refer to the added file in a gateway, like so: hidden, _, _ := req.Option(hiddenOptionName).Bool() silent, _, _ := req.Option(silentOptionName).Bool() chunker, _, _ := req.Option(chunkerOptionName).String() - dopin, pin_found, _ := req.Option(pinOptionName).Bool() + dopin, _, _ := req.Option(pinOptionName).Bool() rawblks, _, _ := req.Option(rawLeavesOptionName).Bool() - if !pin_found { // default - dopin = true - } - if hash { nilnode, err := core.NewNode(n.Context(), &core.BuildCfg{ //TODO: need this to be true or all files