We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5288887 + 97859eb commit 7595c7cCopy full SHA for 7595c7c
lib/msf/ui/console/command_dispatcher/modules.rb
@@ -94,10 +94,12 @@ def cmd_edit(*args)
94
print_status("Launching #{editor} #{path}")
95
system(editor, path)
96
97
- # XXX: This will try to reload *anything* and break on modules
98
- if args.length > 0
+ # XXX: This will try to reload *any* .rb and break on modules
+ if args.length > 0 && path.end_with?('.rb')
99
print_status("Reloading #{path}")
100
load path
101
+ else
102
+ print_error('Only Ruby files can be reloaded')
103
end
104
else
105
print_error('Nothing to edit -- try using a module first.')
0 commit comments