Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
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
PSDI Army
yii2
Commits
67677dd7
Commit
67677dd7
authored
Jul 11, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed build app/link to work on Windows
parent
ff50f150
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
AppController.php
build/controllers/AppController.php
+16
-2
No files found.
build/controllers/AppController.php
View file @
67677dd7
...
...
@@ -23,6 +23,20 @@ class AppController extends Controller
public
$defaultAction
=
'link'
;
/**
* Properly removes symlinked directory under Windows, MacOS and Linux
*
* @param string $file path to symlink
*/
protected
function
unlink
(
$file
)
{
if
(
is_dir
(
$file
))
{
rmdir
(
$file
);
}
else
{
unlink
(
$file
);
}
}
/**
* This command runs the following shell commands in the dev repo root:
*
* - Run `composer update`
...
...
@@ -41,13 +55,13 @@ class AppController extends Controller
// cleanup
if
(
is_link
(
$link
=
"
$appDir
/vendor/yiisoft/yii2"
))
{
$this
->
stdout
(
"Removing symlink
$link
.
\n
"
);
unlink
(
$link
);
$this
->
unlink
(
$link
);
}
$extensions
=
$this
->
findDirs
(
"
$appDir
/vendor/yiisoft"
);
foreach
(
$extensions
as
$ext
)
{
if
(
is_link
(
$link
=
"
$appDir
/vendor/yiisoft/yii2-
$ext
"
))
{
$this
->
stdout
(
"Removing symlink
$link
.
\n
"
);
unlink
(
$link
);
$this
->
unlink
(
$link
);
}
}
...
...
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