Skip to content
This repository has been archived by the owner on Jul 2, 2018. It is now read-only.

Escape dirname for shell commands in install_seed #44

Merged
merged 1 commit into from Nov 5, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/cocoaseeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
require 'fileutils'
require 'xcodeproj'
require 'yaml'
require 'shellwords'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.


module Seeds
require 'cocoaseeds/version'
Expand Down
2 changes: 1 addition & 1 deletion lib/cocoaseeds/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def remove_seeds
def install_seeds
self.seeds.sort.each do |name, seed|
dirname = File.join(self.root_path, "Seeds", seed.name)
self.install_seed(seed, dirname)
self.install_seed(seed, Shellwords.escape(dirname))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant self detected.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shutup


next if not seed.files

Expand Down