Skip to content

Commit

Permalink
Fix compile error: require "codegen" feature for main()
Browse files Browse the repository at this point in the history
  • Loading branch information
Expurple committed Dec 28, 2023
1 parent 4ea23d0 commit 2d98edf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sea-orm-cli/src/cli.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use clap::{ArgGroup, Parser, Subcommand, ValueEnum};
#[cfg(feature = "codegen")]
use dotenvy::dotenv;

#[cfg(feature = "codegen")]
use crate::{handle_error, run_generate_command, run_migrate_command};

#[derive(Parser, Debug)]
Expand Down Expand Up @@ -315,6 +317,7 @@ pub enum DateTimeCrate {

/// Use this to build a local, version-controlled `sea-orm-cli` in dependent projects
/// (see [example use case](https://github.com/SeaQL/sea-orm/discussions/1889)).
#[cfg(feature = "codegen")]
pub async fn main() {
dotenv().ok();

Expand Down

0 comments on commit 2d98edf

Please sign in to comment.