Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
I
installer
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vnp-framework
installer
Commits
bd06802b
Commit
bd06802b
authored
Apr 04, 2016
by
Roman Sevastyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Install into current dir
parent
a0a6d8fe
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
NewCommand.php
src/NewCommand.php
+3
-3
No files found.
src/NewCommand.php
View file @
bd06802b
...
@@ -24,7 +24,7 @@ class NewCommand extends Command
...
@@ -24,7 +24,7 @@ class NewCommand extends Command
$this
$this
->
setName
(
'new'
)
->
setName
(
'new'
)
->
setDescription
(
'Create a new Laravel application.'
)
->
setDescription
(
'Create a new Laravel application.'
)
->
addArgument
(
'name'
,
InputArgument
::
REQUIRED
)
->
addArgument
(
'name'
,
InputArgument
::
OPTIONAL
)
->
addOption
(
'dev'
,
null
,
InputOption
::
VALUE_NONE
,
'Installs the latest "development" release'
);
->
addOption
(
'dev'
,
null
,
InputOption
::
VALUE_NONE
,
'Installs the latest "development" release'
);
}
}
...
@@ -42,7 +42,7 @@ class NewCommand extends Command
...
@@ -42,7 +42,7 @@ class NewCommand extends Command
}
}
$this
->
verifyApplicationDoesntExist
(
$this
->
verifyApplicationDoesntExist
(
$directory
=
getcwd
()
.
'/'
.
$input
->
getArgument
(
'name'
),
$directory
=
(
$input
->
getArgument
(
'name'
))
?
getcwd
()
.
'/'
.
$input
->
getArgument
(
'name'
)
:
getcwd
(
),
$output
$output
);
);
...
@@ -84,7 +84,7 @@ class NewCommand extends Command
...
@@ -84,7 +84,7 @@ class NewCommand extends Command
*/
*/
protected
function
verifyApplicationDoesntExist
(
$directory
,
OutputInterface
$output
)
protected
function
verifyApplicationDoesntExist
(
$directory
,
OutputInterface
$output
)
{
{
if
(
is_dir
(
$directory
)
||
is_file
(
$directory
))
{
if
(
(
is_dir
(
$directory
)
||
is_file
(
$directory
))
&&
$directory
!=
getcwd
(
))
{
throw
new
RuntimeException
(
'Application already exists!'
);
throw
new
RuntimeException
(
'Application already exists!'
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment