developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#1341 closed bug (fixed)

createapp.php ne créé pas/plus d'application

Reported by: foxmask Owned by: foxmask
Priority: normal Milestone: Jelix 1.3 beta 1
Component: jelix-scripts Version: trunk
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:

Description

la dernière nightly (1.3pre.1930) ne permet plus de créer d'application, on obtient soit :

C:\WEB\DOCUMENT_ROOT\www_jelix_13\lib\jelix-scripts>php createapp.php toto c:\toto

[error:0]       too many parameters

soit

C:\WEB\DOCUMENT_ROOT\www_jelix_13\lib\jelix-scripts>php createapp.php c:\toto
[warning:1]     array_shift() expects parameter 1 to be array, boolean given

[warning:1]     array_shift() expects parameter 1 to be array, boolean given

Change History (6)

comment:1 Changed 9 years ago by laurentj

  • Milestone set to Jelix 1.3

on obtient soit :

ça c'est normal. RTFM

soit

pas assez d'informations. active le debugMode dans la conf jelix-scripts.

comment:2 Changed 9 years ago by foxmask

  • review set to review?

Le probleme est propre à Windows.

Avec le debugMode à true ca dit :

[warning:1]     array_shift() expects parameter 1 to be array, boolean given    C:\WEB\DOCUMENT_ROOT\www_jelix_13\lib\jelix-scripts\includes
\JelixScriptCommand.class.php   561
        trace:
        0       array_shift()   C:\WEB\DOCUMENT_ROOT\www_jelix_13\lib\jelix-scripts\includes\JelixScriptCommand.class.php : 561
        1       JelixScriptCommand->getRealPath()       C:\WEB\DOCUMENT_ROOT\www_jelix_13\lib\jelix-scripts\commands-single\createapp.cmd.ph
p : 67
        2       createappCommand->run() C:\WEB\DOCUMENT_ROOT\www_jelix_13\lib\jelix-scripts\includes\scripts.inc.php : 48
        3       require()       C:\WEB\DOCUMENT_ROOT\www_jelix_13\lib\jelix-scripts\createapp.php : 12

la solution est de faire ceci

$cut = (DIRECTORY_SEPARATOR == '/'? '!/!': '!\\\!');

à la place de cela

$cut = (DIRECTORY_SEPARATOR == '/'? '!/!': '![/\\]!');

dans le script JelixScriptCommand.class.php

C:\WEB\DOCUMENT_ROOT\www_jelix_13\lib\jelix-scripts>php createapp.php c:\toto

C:\WEB\DOCUMENT_ROOT\www_jelix_13\lib\jelix-scripts>dir c:\toto

 Répertoire de c:\toto

19/05/2011  19:25    <REP>          .
19/05/2011  19:25    <REP>          ..
19/05/2011  19:25                13 .htaccess
19/05/2011  19:25               510 application.init.php
19/05/2011  19:25               344 cmd.php
19/05/2011  19:25    <REP>          install
19/05/2011  19:25    <REP>          modules
19/05/2011  19:25    <REP>          plugins
19/05/2011  19:25             1 047 project.xml
19/05/2011  19:25    <REP>          responses
19/05/2011  19:25    <REP>          scripts
19/05/2011  19:25    <REP>          tests
19/05/2011  19:25    <REP>          var
19/05/2011  19:25    <REP>          www
               4 fichier(s)            1 914 octets
              10 Rép(s)  683 748 163 584 octets libres

Si tu veux un patch , à ton service ;)

comment:3 Changed 9 years ago by foxmask

sinon un simple push ferai l'affaire :)

comment:4 Changed 9 years ago by foxmask

  • Owner set to foxmask
  • review review? deleted

comment:5 Changed 9 years ago by foxmask

  • Resolution set to fixed
  • Status changed from new to closed

ChangeSet? https://bitbucket.org/jelix/jelix-trunk/changeset/c12110ffd753

Tests faits :

C:\WEB\DOCUMENT_ROOT\jelix-1.3pre-dev\lib\jelix-scripts>php createapp.php c:/foo/bar

C:\WEB\DOCUMENT_ROOT\jelix-1.3pre-dev\lib\jelix-scripts>php createapp.php c:/foobar\dummy

C:\WEB\DOCUMENT_ROOT\jelix-1.3pre-dev\lib\jelix-scripts>php createapp.php c:\dummy/foobar

C:\WEB\DOCUMENT_ROOT\jelix-1.3pre-dev\lib\jelix-scripts>php createapp.php c:\acme\cartoons

comment:6 Changed 9 years ago by foxmask

tests faits sous linux pour verifier qu'aucune regression n'apparaisse

foxmask@home:~/jelix-1.3pre-dev/lib/jelix-scripts$ php createapp.php ~/foo/bar
foxmask@home:~/jelix-1.3pre-dev/lib/jelix-scripts$ ls ~/foo
bar  temp
Note: See TracTickets for help on using tickets.