Skip to content
This repository was archived by the owner on Sep 19, 2019. It is now read-only.

Commit 8377bb5

Browse files
committed
Raise an error when trying to cat an incomplete item path
1 parent ddfccaa commit 8377bb5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/program.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ program
156156
var client = utils.newApi(options);
157157

158158
// FIXME: resolve nested fields
159+
if (item[item.length - 1] == '/') {
160+
utils.panic("invalid item '" + item + "'");
161+
}
159162
utils.searchItems(item, client, function(items) {
160163
_.forEach(items, function(item) {
161164
if (options.trunc) {

0 commit comments

Comments
 (0)